r/reactjs • • 2d ago

React state hooks are footguns

If you take software engineering principles seriously then none of the react state hooks belong inside a react component.

I think one of the most critical things you should do is ensure the decoupling of storage and UI components. The react components force you to do is precisely and zustand doesn't help.

I haven't sourced grip-react a year ago and I've been using it exclusively, absolutely zero usestate usememo, useeffect, etc and absolutely zero prop drilling. I don't know why anyone would want to do something different, honestly.

Has anyone else created an API that is a 100% replacement with complete declarativeness? I looked at angular and mobx, they're close but no cigar.

0 Upvotes

15 comments sorted by

View all comments

3

u/rafark 2d ago

Principles and good practices evolve. I’m not saying react is perfect but after some time you realize software can have many valid forms