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

19 lines (16 loc) 340 B
/** * External dependencies */ import { useRef, useEffect, } from 'react'; // https://blog.logrocket.com/accessing-previous-props-state-react-hooks/ const usePrevious = ( value : any ) : any => { const ref = useRef<any>(); useEffect( () => { ref.current = value; }, [value] ); return ref.current; }; export default usePrevious;