Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useLocalStorage - globally reactivity #2607

Open
TangoPJ opened this issue Nov 30, 2024 · 1 comment
Open

useLocalStorage - globally reactivity #2607

TangoPJ opened this issue Nov 30, 2024 · 1 comment

Comments

@TangoPJ
Copy link

TangoPJ commented Nov 30, 2024

Hello! Is it possible to achieve reactivity of localStorage across different components when the data is updated in one of them?

Something like in this example: https://stackblitz.com/edit/react-starter-typescript-3cjkkm?file=App.tsx

@patrickhuijten
Copy link

I think react-use is no longer actively being developed.

A good alternative is @react-hookz/web. They cover this exact use case in useLocalStorageValue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants