golemfactory / onboarding_staging

0 stars 0 forks source link

Fix problems with `useLocalStorage` #106

Closed pociej closed 6 months ago

pociej commented 6 months ago

uselocalStorage initised with provided initial value after read localStorage afterwards and update state inside useEffect. It leads to unexpexted side effects. We should have control on initialisation.

pociej commented 6 months ago

Update lib version to 2.15 should fix the problem. as there is exptra param added to signature doing exactly what I needed. { initializeWithValue : boolean }.