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

I know this is controversial, but I find them hard to understand. When I call `useState()`, what's the identity of the state that I'm using? What ties the state together between subsequent invocations of my component? For example, I know that strange things happen if you conditionally invoke `useState()`. People like to talk about "functional components", but hooks seem to live and breathe on mysterious side effects that I don't understand.


If only there was some way to discover how things worked... Some website where you could type “how react hooks work” and get dozens of articles and blog posts explaining it.


I understand how they work. That doesn't make the API any less insane.


You're probably aware of this, but those things already exist.

Personally, I prefer to use things that make more sense, even if I read dozens of articles and blogs explaining them.




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

Search: