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
useLocalStorage is not updating the value properly when passing an updater function. This is due to state not being included in the useCallback deps for the setter function (line 82 below).
This seems to be the same problem reported in #2273, although using pretty vague title and description. Also, PR #2277 aims at solving this, although it might need some extra work (and tests).
useLocalStorage
is not updating the value properly when passing an updater function. This is due tostate
not being included in theuseCallback
deps for the setter function (line 82 below).react-use/src/useLocalStorage.ts
Lines 59 to 83 in 325f5bd
(I may be able to open a PR for this if I find some time to spare this or next week.)
The text was updated successfully, but these errors were encountered: