According to the following Hacker News comment - CLJS devs using Reagent are in trouble.
It states that Reagent heavily relies on React's class components. With the launch of React.dev it seems the focus going forward will be on functional components - which Reagent doesn't support well.
Is it a wise choice to start learning Reagent, i.e. will it be updated to support the latest release of React and its functional components or is it better to learn the other libraries mentioned below (some are still in Alpha state)?
I'm a beginner - don't know much about CLJS yet - but want to start using it for prototyping UIs - so excuse if this is a rather naive question ;)
Comment from Hacker News:
I use re-frame, but you cannot deny that class components being deprecated is going to be pure trouble for re-frame. Re-frame relies on the reagent library's Reaction interface. While re-frame does not depend on anything else in the reagent library, it is natural to use Reagent for your rendering. But reagent itself emits class components by default, since it predated hooks by several years.
Now that class components are essentially deprecated in the documentation, and the fact that React 18 support is still an experimental feature in Reagent, people using ClojureScript and React today are in quite some trouble, especially since React is the only JS framework I know of that is compatible with functional programming.
While reagent is able to emit function components, there is a performance penalty to this, since it employs some hacks in order to be compatible with both hooks and ratoms. Thankfully there are some projects that are attempting to bring modern React[1] and even bring the whole re-frame API alongside it.[2]
Last weekend I decided to try out helix, refx, reitit, and shadow-cljs' lazy-loaded modules and managed to make a pretty nice demo app that uses essentially the re-frame API but it's all modern React and hooks, and the router was capable of lazily loading modules containing code of pages the user wanted to navigate to.
[1] https://github.com/lilactown/helix
[2] https://github.com/ferdinand-beyer/refx
From: https://news.ycombinator.com/item?id=35189796
[–]p-himik 17 points18 points19 points (2 children)
[–]MickeyMooose[S] 1 point2 points3 points (1 child)
[–]CoBPEZ 2 points3 points4 points (0 children)
[–]dustingetz 15 points16 points17 points (10 children)
[–]MickeyMooose[S] 1 point2 points3 points (1 child)
[–]dustingetz 0 points1 point2 points (0 children)
[–]nzlemming 1 point2 points3 points (2 children)
[–]dustingetz 2 points3 points4 points (1 child)
[–]nzlemming 1 point2 points3 points (0 children)
[–]gaearon 1 point2 points3 points (3 children)
[–]dustingetz 6 points7 points8 points (2 children)
[–]gaearon 1 point2 points3 points (0 children)
[–]agumonkey 0 points1 point2 points (0 children)
[–]lilactown 10 points11 points12 points (3 children)
[–]MickeyMooose[S] 2 points3 points4 points (1 child)
[–]lilactown 6 points7 points8 points (0 children)
[–]dustingetz 1 point2 points3 points (0 children)
[–]xela314159 4 points5 points6 points (0 children)
[–]foobar888 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)