@rcp/use.persistref
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

@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

Package Sidebar

Install

npm i @rcp/use.persistref

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

6.11 kB

Total Files

14

Last publish

Collaborators

  • moyuyc