6 ms·
How can you use hooks right now? The standard is reagent which compiles down to classes which don't work with hooks. I think reagent has given a functional reac
by ambulancechaser 7y ago
How can you use hooks right now? The standard is reagent which compiles down to classes which don't work with hooks. I think reagent has given a functional react and hooks style programming for years but now is a little behind the curve.
- capableweb 7y agoYou would do what Reagent does and use JS interop yourself and call React directly. Plenty of people in Clojure-land implement things themselves if the thing to implement seems simple enough. Probably more true for Clojure developers than let's say JS/Ruby developers.
- iLemming 7y agoReagent works with hooks. https://github.com/reagent-project/reagent/blob/363f2d4976ac077a289d7a5d46d41a22e15d723c/doc/ReactFeatures.md#hooks https://github.com/reagent-project/reagent/blob/363f2d4976ac...
- orestis 7y agoThere’s a library called hx that embraces hooks and the native React way. You still write hiccup, but you get a React functional component.