re: Fast & easy... React states management in one function VIEW POST

TOP OF THREAD FULL DISCUSSION
re: In the second example? The state is the obj variable. You can see I’m creating an obj and using key-value pairs in It. Then I’m passing the object...
 

you defining obj, but then you use state. in non-strict mode this leads to the creation of a global variable, in strict mode this leads to an error.

After that you use obj again, so the new value saved in state in state isn't even used.

code of conduct - report abuse