usesavetolocalstorage
v1.0.5
Published
```bash npm i usesavetolocalstorage ```
Downloads
1
Readme
useSaveToLocalStorage
npm i usesavetolocalstorage
Usage:
import {createDb, useSaveToLocalStorage} from 'usesavetolocalstorage'
// Using setup for storing on localstorage
const initial = {current: {}, todos: []}
const db = createDb('db', initial)
export default function App() {
const [data, setData] = useData(db.data)
useSaveToLocalStorage(db, data)
// ...
See in action in this repository
Thanks for visting.