3 ms·
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 sta
by recursive 5y ago
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.
- jahewson 5y agoIf 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.
- canadianfella 5y ago> If only there was That’s an annoying way to communicate.
- mdoms 5y agoI understand how they work. That doesn't make the API any less insane.
- recursive 5y agoYou'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.