Skip to content

useLocalStorage not updating correctly with multiple calls #345

Description

@svengau

if you ask multiple time to update local storage, only the last call is applied.

I've done a a codepen to illustrate the issue, with a fix using a ref (thanks to Grok):

https://codesandbox.io/p/devbox/serene-monad-7wzycc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions