DEV Community


Discussion on: Fast & easy... React states management in one function

kayis profile image

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.

Thread Thread
genta profile image