UNPKG

react-native-stonk-charts

Version:

A beautiful, performant chart library for React Native. Fork of react-native-wagmi-charts with Reanimated v4 support.

10 lines (8 loc) 230 B
import React from 'react'; export function usePrevious<T>(value: T): T | undefined { const ref = React.useRef<T | undefined>(undefined); React.useEffect(() => { ref.current = value; }, [value]); return ref.current; }