Custom react hook for cross-synced local storage
npm install use-synced-local-storage> Custom react hook for synced local storage, listens to manual or cross-tab changes and updates accordingly
 
``bash`
npm install --save use-synced-local-storage
`jsx
import React from "react";
import { useSyncedLocalStorage } from "use-synced-local-storage";
const App = () => {
const [storage, setStorage] = useSyncedLocalStorage("storage-key", 1);
return (
<>
{storage}
>
);
};
export default App;
``
MIT © berkeatac
---
This hook is created using create-react-hook.