Hacker News new | past | comments | ask | show | jobs | submit login

"Just" is not really fair here, they're a window into global variables. Global state is awful to deal with but a necessity in the real world, so having some sort of constrained global state is something we're always trying to solve in new ways, singletons, monads, etc. Here we have hooks, which is an interesting experiment but something I personally would have played with in some new framework rather than dropping into the most popular and mainstream one.



Depends on what you mean by global state. You don't have access to a single pool of global variables. You only have access to what you put there and what you've been given.


Is it that they are global state to react but not to the programmer or his/her code?


It's that they are not shared like globals.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: