Skip to content

Repository files navigation

@taystack/use-storage

Strong types for local storage access using react hooks.

NPMJavaScript Style Guide

Install

npm install --save @taystack/use-storage

Usage

Similar to React.useState. All use*Storage methods apply

import{useLocalStorageString}from'@taystack/use-storage'functionMyComponent(){const[value,setValue]=useLocalStorageString('my_store_key','default value')return(<div>My stored value {value}</div>)}

License

MIT © taystack


This hook is created using create-react-hook.

About

Strong types for session or local storage access using react hooks.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages