This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-23
Channels
- # announcements (1)
- # babashka (68)
- # babashka-sci-dev (12)
- # beginners (36)
- # biff (22)
- # calva (20)
- # clerk (1)
- # clj-on-windows (7)
- # clojure (27)
- # clojure-conj (8)
- # clojure-denmark (2)
- # clojure-europe (141)
- # clojure-france (1)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-uk (2)
- # clojurescript (7)
- # conjure (8)
- # core-async (111)
- # cursive (3)
- # datahike (4)
- # datalevin (18)
- # events (9)
- # gratitude (4)
- # guix (2)
- # helix (3)
- # hyperfiddle (62)
- # introduce-yourself (2)
- # kaocha (4)
- # london-clojurians (3)
- # lsp (7)
- # malli (34)
- # membrane (1)
- # nbb (9)
- # polylith (4)
- # portal (6)
- # reagent (4)
- # releases (2)
- # remote-jobs (4)
- # shadow-cljs (30)
- # sql (2)
- # tools-deps (58)
- # xtdb (9)
If I am making heavy use of JS react libraries like MUI and react-dnd, and making increasing use of hooks, is sticking with reagent really worth it? I recall seeing something like function components in reagent being slower than the class-based components, but my app is still in a state where refactoring reagent into something else (e.g. helix) is doable ratoms feel pretty redundant in light of hooks like useState — but semantics wise, I know hooks are annoying compared to ratoms. And in general I’m a bit lost on whether it’d be a mistake to continue using reagent in light of heavy JS interop and increasing hook usage.
Reagent without atoms/reactions makes little sense. You can switch to Helix or something similar and, if you end up craving atoms, that existing code should be easy enough to simply include in a Reagent app. After all, Reagent can work with React components just fine.
Well, I use plenty of ratoms until something from JS world forces me into hooks, which in case I use function components where I can use hooks and ratoms. But if I continue doing this (i.e. using JS react components that simply require hooks), then I wonder whether ratoms become redundant in light of hooks like useState
In another context, I was not crazy about working on an app where they mixed ratoms and re-frame subscriptions et al together. One trick I use in situations like this is to take a backup 🙂 and dive into the refactoring. In about an hour I know if it was a bad or great idea.