Re:Learn ClojureScript: Discovering Sequence Operations
by ambulancechaser on Saturday October 19, 2019 @06:06PM
(#21301049)
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.
[ Parent
| on HN ]
Re:Learn ClojureScript: Discovering Sequence Operations
by orestis on Sunday October 20, 2019 @02:37AM
(#21302597)
There’s a library called hx that embraces hooks and the native React way. You still write hiccup, but you get a React functional component.
Re:Learn ClojureScript: Discovering Sequence Operations
by iLemming on Sunday October 20, 2019 @02:18AM
(#21302553)
Reagent works with hooks. https://github.com/reagent-project/reagent/blob/363f2d4976ac...
Re:Learn ClojureScript: Discovering Sequence Operations
by capableweb on Saturday October 19, 2019 @07:33PM
(#21301369)
You 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.