UNPKG

react-native-mapsforge-vtm

Version:

React Native components to build vector maps using Mapsforges fork of vtm. Offline rendering of OpenStreetMap data. Android only

21 lines (19 loc) 494 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); /** * External dependencies */ // https://blog.logrocket.com/accessing-previous-props-state-react-hooks/ const usePrevious = value => { const ref = (0, _react.useRef)(); (0, _react.useEffect)(() => { ref.current = value; }, [value]); return ref.current; }; var _default = exports.default = usePrevious; //# sourceMappingURL=usePrevious.js.map