This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-02
Channels
- # announcements (1)
- # babashka (4)
- # beginners (39)
- # calva (36)
- # cherry (11)
- # cider (23)
- # clj-on-windows (3)
- # clojure (105)
- # clojure-brasil (1)
- # clojure-chicago (3)
- # clojure-conj (8)
- # clojure-denver (4)
- # clojure-europe (18)
- # clojure-germany (5)
- # clojure-hungary (13)
- # clojure-nl (1)
- # clojure-norway (31)
- # clojure-sweden (9)
- # clojure-uk (2)
- # clojurescript (22)
- # core-async (4)
- # cursive (8)
- # data-science (25)
- # datomic (14)
- # devops (1)
- # emacs (9)
- # events (5)
- # holy-lambda (32)
- # hyperfiddle (26)
- # introduce-yourself (2)
- # kaocha (1)
- # leiningen (11)
- # lsp (17)
- # malli (8)
- # off-topic (84)
- # pedestal (4)
- # polylith (2)
- # re-frame (17)
- # reitit (1)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (8)
- # sql (4)
- # tools-deps (8)
- # transit (5)
- # vim (1)
- # vscode (1)
- # xtdb (45)
I’ve just heard some rumors from the clojure conj that reagent is becoming absolete and won’t be updated to the latest React 19 and that React is going to deprecate classes alongside with lifecycle methods. Being compatible with the current React is crucial for us because we have a lot of JS components. What are the current alternatives to reagent/re-frame?
Not sure how true this gossip is but https://github.com/pitch-io/uix by @U0FR82FU1 or https://github.com/lilactown/helix by @U4YGF4NGM seem pretty good. UIx has bindings to re-frame @U061V0GG2 is there anything behind this gossip?
Hmm, The Google is letting me down. Where can I find info on React 19?
Thx for the link. From the OP: "React is the only JS framework I know of that is compatible with functional programming." Not sure what the OP meant, but if we are talking about declarative/granular/efficient, there is MobX, SolidJS, and even https://tilton.medium.com/simplejx-aweb-un-framework-e9b59c12dcff and the CLJS version of that, Web/MX. Agreed on the UIx and Helix alternatives. Also not clear is how fast and/or dead-endish will be the "deprecated". That can take years, and I suspect React will not want to give users a reason to look elsewhere. Didn't Angular 2 take the wind out of Angular's sails and give React an opening? :thinking_face:
I think class components will stay for quite a while considering React 18 still has no way to make error boundaries with function components. If you do want modernized React wrappers, take a look at Helix and how it was used in one of the Conj talks. You also can still use re-frame via #C041XN6DADU
I think there was a second Conj talk that also mentioned use of Helix but my memory is slowly fading on that 😁
The linked discussion has valid points about some problems with Reagent, like runtime Hiccup conversion. And there are other of design choices in Reagent that are making further development really complicated. E.g. good React 18 support is hard to implement properly due to Reagents async rendering queue. (Though async render queue might be one of the things that could be removed from Reagent without breaking lots of apps... maybe.) If fixing these things means breaking all or most existing Reagent apps, there is no much reason to write such "Reagent 2" as Helix and UIx2 already exists.
I don't know if Reagent will be deprecated, that will depend on React 19, but there is probably good chance that Reagent will be somewhat usable with it, as Reagent can produce function components.
if i had to guess, i think people using reagent today will be fine for a couple of years; i'd be surprised if react 19 releases as soon as next year, and I dont see any RFCs showing how to implement error boundaries with function components... not to mention the vast amount of legacy code out there that people rely on, which likely uses class components
Yeah, they've been careful about not breaking existing code.
I think I remember some discussion where they talk about introducing new features opt-in. (Which is what React 18 did.)
That would mean that Reagent should keep working quite well, but using the new React features might be inconvenient.
I responded in a reddit thread about FUD re: React breaking things based on what their docs now say https://www.reddit.com/r/Clojure/comments/11uluj4/reactdev_are_cljs_developers_using_reagent_in/jczh634/