News for hackers. Stuff that matters.
Re:Learn ClojureScript: Discovering Sequence Operations by adz5a on Saturday October 19, 2019 @04:44PM (#21300655)
Hello, this is a really interesting comment although I disagree with some of its points. I recently had my first full time Clj/Cljs job and it made me realise some points:

- although figwheel is an awesome build tool, shadow-cljs with its near seamless npm integration is imo the most powerful Cljs build tool atm [1].

- cljs-bean[2], recently released by Mike Fikes is a really cool tool: it makes working with POJO really easy without too much performance penalty

- the new react hook API is imo a game changer for CLJS frontend frameworks: the decision to overload native function for componenents instead of using ES6 classes makes working with react componenent much more easier, imo this new API suits CLJS perfectly: hooks are just js functions that are called in the same order at each render pass.

- clojure.spec and clojure.spec.gen in a REPL are really powerful tools for frontend development that are unavailable in the wide JS world.

All in all I am actually much more optimist than a few months back about the future of CLJS frontend dev, those are still relatively new tools, clojure.spec is still a work in progress (although I would recommend to take a look at the metosin spec-tools which are really nice).

Edit: formatting

[1] https://code.thheller.com/blog/shadow-cljs/2018/06/15/why-no...

[2] https://github.com/mfikes/cljs-bean

Re:Learn ClojureScript: Discovering Sequence Operations by kendru on Saturday October 19, 2019 @05:10PM (#21300789)
I was not aware of cljs-bean, but it definitely looks like it's worth checking out!
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.
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)
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.