Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I 100% disagree. If there's need for centralized state for certain pieces of data, make it so. But premature usage of global state under the guise of "I might need it in the future" is a plague that makes apps much more complex than they have to be.

There's zero need to make everything be the same. There's not even the need to keep state in one single place: you can control all the state and its transitions locally but then "copy" to state management if you need it somewhere else. This is a perfectly valid solution too.

Another problem of using global state for everything is that it reduces the possibility of using a lot of component-level or hook-level abstractions that would be otherwise very useful. You're now forced to do everything through Redux or something like that.

There's no need to rush for an "absolute" solution with all that overhead as if it was a golden bullet. It's not.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: