0.1.3 • Published 1 year ago

use-localstorage-sync v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Localstorage Sync

React hooks api to synchronize localstorage as a state across browser tabs

Start with

  yarn add use-localstorage-sync

and can be used as a state hook in any React component

+ import useLocalStorage from "use-localstorage-sync";

+ const [value, setValue] = useLocalStorage("key");

Similar to the useState hook, the value in the associated key is updated in localstorage, it is updated. Similarly, the setValue updates the state in all associated browser tabs simulataneously.

0.1.2

1 year ago

0.1.3

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago