recoil-localstorage-selector
v0.0.3
Published
``` yarn add recoil-localstorage-selector ```
Downloads
1
Readme
Recoil Localstorage Selector
Installation
yarn add recoil-localstorage-selector
Usage
import localStorageSelector from 'recoil-localstorage-selector'
const defaultValue = 0
const countAtom = atom({
key: 'countState',
default: defaultValue,
})
const countPersist = localStorageSelector(
countAtom, 'countPersistState', defaultValue
)
Function description:
localStorageSelector(atom, selectorKey, defaultValue)
Contributing
Pull requests are welcome.