Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start data from localStorage not working #76

Open
pacocom opened this issue Apr 15, 2021 · 1 comment
Open

Start data from localStorage not working #76

pacocom opened this issue Apr 15, 2021 · 1 comment

Comments

@pacocom
Copy link

pacocom commented Apr 15, 2021

When component is initialize, data from localStorage is not reading:

See your example:
https://stackblitz.com/edit/react-vbrkjb?embed=1&file=index.js
image

@pacocom pacocom changed the title Start data form localStorage not working Start data from localStorage not working Apr 15, 2021
@iamsolankiamit
Copy link
Member

Late reply, but it seems that the typeof getNum === 'number' is false on the first run. Seems like there is some in consistency on how the data is converted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants