Thanks! Lots I didn't know here, especially about the limitations. One use I had was for users to see a live version of their edits to a profile before committing them. That way if they wanted to return to edits they could without updating the underlying data.
I've been wondering - what are the limitations of using localStorage as if it were global state in a React app (say for folks who want to avoid Redux)?
I tried to use locaStorage as a global state on a project, and it doesn’t automatically reflect the updates or changes in state unlike using Redux or there was somewhat of a delay since it needs to getItem then setItem and then return it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks! Lots I didn't know here, especially about the limitations. One use I had was for users to see a live version of their edits to a profile before committing them. That way if they wanted to return to edits they could without updating the underlying data.
I've been wondering - what are the limitations of using localStorage as if it were global state in a React app (say for folks who want to avoid Redux)?
I tried to use locaStorage as a global state on a project, and it doesn’t automatically reflect the updates or changes in state unlike using Redux or there was somewhat of a delay since it needs to getItem then setItem and then return it.