DEV Community

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

 
shiftyp profile image
Ryan Kahn (he/him)

A great library would be so inspiring and accessible that you could and would want to adapt parts of it or ideas from it for your own use. I'm happy it resonated with you, and you were able to pick up on the pattern and adapt it!

Thread Thread
 
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!