UNPKG

react-native-app-notification

Version:
20 lines (19 loc) 505 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var react_1 = require("react"); var useLayout = function () { var _a = react_1.useState({ height: 0, width: 0, x: 0, y: 0, }), layout = _a[0], setLayout = _a[1]; var bindLayout = { onLayout: function (_a) { var layout = _a.nativeEvent.layout; return setLayout(layout); }, }; return [layout, bindLayout]; }; exports.default = useLayout;