@rcp/use.persistref
Persist the ref value
Installation
npm install @rcp/use.persistref
# or use yarn
yarn add @rcp/use.persistref
Usage
import usePersistRef from '@rcp/use.persistref'
const App = ({ val }) => {
const valRef = usePersistRef(val)
valRef.current === val
}
API
Related
Authors
This library is written and maintained by 余聪, yucong@yuanfudao.com.
License
MIT