loading...

re: react-use-localstorage VIEW POST

FULL DISCUSSION
 

why do you also save into state? for re-renders?

 

That's a great observation, Andreas.

It's to turn <input /> into a controlled component, which makes input's state to be controlled by React (one source of truth for state)

Code of Conduct Report abuse