1.2.2 • Published 2 years ago

@rcp/use.persistref v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@rcp/use.persistref

NPM version NPM Downloads

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