UNPKG

react-native-web-internals

Version:

React Native for Web

24 lines (23 loc) 897 B
import UIManager from "../UIManager/index.native.js"; import useStable from "../useStable/index.native.js"; function usePlatformMethods(param) { var { pointerEvents, style } = param, ref = useStable(function () { return function (hostNode) { hostNode != null && (hostNode.measure = function (callback) { return UIManager.measure(hostNode, callback); }, hostNode.measureLayout = function (relativeToNode, success, failure) { return UIManager.measureLayout(hostNode, relativeToNode, failure, success); }, hostNode.measureInWindow = function (callback) { return UIManager.measureInWindow(hostNode, callback); }); }; }); return ref; } var usePlatformMethods_default = usePlatformMethods; export { usePlatformMethods_default as default, usePlatformMethods }; //# sourceMappingURL=index.native.js.map