I just store the state inside localStorage and access it whenever I want but sometimes it bothers me that user can manipulate the state by injecting their own JS script inside the console
Just to be clear, this is the case regardless of if you're using localStorage or a state management lib. Anything on the client should be considered accessible to the user.
Just to be clear, this is the case regardless of if you're using
localStorage
or a state management lib. Anything on the client should be considered accessible to the user.I've been bugging myself for quite some time about this. Now I can stop concerning too much about keeping state in
localStorage
.Thank you. 🙂
Yes, don't worry about it unless it's sensitive information - that should never be stored on the client.