astoilkov / use-local-storage-state

React hook that persists data in localStorage
MIT License
1.1k stars 41 forks source link

I have a problem using the use-local-storage-state #48

Closed marcosvspimenta closed 2 years ago

marcosvspimenta commented 2 years ago

I have this problem here. https://stackoverflow.com/questions/71759515/icons-are-not-showing-after-clicking-close

I think it's because of use-local-storage-state

Can anybody help me?

astoilkov commented 2 years ago

Can you try to upgrade to version 17.0.1 (I just published it) and see if the issue still persists?

astoilkov commented 2 years ago

I've tried running the CodeSandbox example you provided in the StackOverflow question but the demo is throwing a lot of errors. See below:

CleanShot 2022-04-07 at 12 23 56@2x

Also I tried forking the example and running it and this caused other errors. See below:

CleanShot 2022-04-07 at 12 25 59@2x

I'm not sure I can help you as this will require a huge amount of time and effort in order to fix all the errors and understand what's happening. Can you fix the errors? I can then debug what's happening in use-local-storage-state hook from there.

marcosvspimenta commented 2 years ago

I don't know what happened but now it's gone in https://codesandbox.io/embed/determined-monad-v4cp38?fontsize=14&hidenavigation=1&theme=dark

the error has been fixed

and the problem can be reproduced

astoilkov commented 2 years ago

If you open DevTools you will see the errors from the first screenshot.

marcosvspimenta commented 2 years ago

I see it now, I'll see what I can do to fix it.

astoilkov commented 2 years ago

@marcosvspimenta Did you find out the problem?

astoilkov commented 2 years ago

I'm closing this because there is a lack of activity. I will reopen if there is a new comment.