Re:Thinking in React Hooks
by pixelbreaker on Thursday December 12, 2019 @11:04AM
(#21772989)
What's your point? This is about Hooks vs Class based components.
[ Parent
| on HN ]
If you need to manage state and want to focus on functions instead of objects (classes), try ClojureScript - especially in combination with [DataScript](https://github.com/tonsky/datascript), an immutable database and Datalog query engine. Clojure/ClojureScript's persistent, immutable memory model makes it much nicer for reasoning about state.
Maybe I'm just a dinosaur, but I can't keep up with all the changes to JavaScript, whereas ClojureScript compiles to ECMAScript 3 and the syntax hasn't changed since its release 12 years ago.
If I had a dollar for every person who says JS moves too fast
This is a blog post about a new feature in React, not a change to JavaScript.