You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
I was calling the setValue for localStorage inside useUnmount, but it does not store the value. It gets value, or set the value on mount or when button was clicked, but does not work during useUnmount. What I want is store store only the value when the component is removed.
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-use. Paste the link to your JSFiddle or CodeSandbox example below:
What is the current behavior?
I was calling the setValue for localStorage inside useUnmount, but it does not store the value. It gets value, or set the value on mount or when button was clicked, but does not work during useUnmount. What I want is store store only the value when the component is removed.
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than
react-use
. Paste the link to your JSFiddle or CodeSandbox example below:What is the expected behavior?
It should update the localStorage on unMount
The text was updated successfully, but these errors were encountered: