News for hackers. Stuff that matters.
Re:The Plan for React 18 by recursive on Tuesday June 08, 2021 @03:59PM (#27440002)
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.
Re:The Plan for React 18 by jahewson on Tuesday June 08, 2021 @04:33PM (#27440391)
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.
Re:The Plan for React 18 by mdoms on Tuesday June 08, 2021 @05:36PM (#27441204)
I understand how they work. That doesn't make the API any less insane.
Re:The Plan for React 18 by recursive on Tuesday June 08, 2021 @05:57PM (#27441485)
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.