This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-17
Channels
- # announcements (1)
- # babashka (26)
- # beginners (28)
- # biff (8)
- # calva (45)
- # cider (62)
- # clara (3)
- # clj-kondo (34)
- # cljfx (1)
- # clojure (72)
- # clojure-belgium (1)
- # clojure-canada (13)
- # clojure-conj (2)
- # clojure-dev (3)
- # clojure-europe (19)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-uk (8)
- # clojurescript (10)
- # clr (36)
- # core-logic (13)
- # cursive (2)
- # datalevin (2)
- # datomic (23)
- # fulcro (13)
- # graphql (23)
- # instaparse (1)
- # introduce-yourself (4)
- # jobs (1)
- # jobs-discuss (13)
- # lsp (30)
- # luminus (7)
- # malli (2)
- # off-topic (57)
- # polylith (13)
- # portal (5)
- # reagent (32)
- # reitit (6)
- # remote-jobs (1)
- # shadow-cljs (25)
- # xtdb (12)
react18, what part of my code is adding 3ms to the render? View is a router-target of TopRouter
So in this release candidate, I'm trying to switch over to using react context instead of dynamic vars, because react 18 can do async rendering, meaning that the render bodies can be called at an arbitrary time where the dynamic vars might be nil again. The only supported solution and react is context. I'm still trying to figure out if I can optimize it some more, but the context consumers at the moment are Auto wrapped onto your components using the factory.
I’m experimenting with trying to go back to using dyn vars. I think in most ways it was ok, and I’ve found a way to fix what wasn’t. Git SHA 291b522d6fb519f69842e74a14fa851f9508af31 (RC5-SNAPSHOT) is out, and it drops the use of React context, which should fix the overhead you’re seeing @kevin842. My preliminary tests seem to work fine, and even with async rendering I think I’ve caught all the things that would break. I’m working on more verifications myself, but would be interested if others trying React 18 could give feedback.
commit https://github.com/fulcrologic/fulcro/commit/291b522d6fb519f69842e74a14fa851f9508af31 does not exist?!
and the react18 branch is 3w old? https://github.com/fulcrologic/fulcro/branches/active
works fine here as well but my app is so far trivial