DEV Community

Discussion on: Introducing Object Hooks: Mutable State for React 🤯

 
yannickfricke profile image
Yannick Fricke

I just wanted this single part only without all the other stuff you have in your code.

KISS - Keep It Stupid Simple

Someone could argue that relying on to much dependencies makes the technical debt bigger and bigger. But this is so simple, you could even write it yourself :D

Thanks again for the idea! :)

Thread Thread
 
shiftyp profile image
Ryan Kahn (he/him)

The extra bit that bridges the diff between resettable state, and mutable state: is taking the setState function and calling it whenever properties on the object change. If that's not a feature you want though, then resettable state is a good solution!