Fork me on GitHub
#fulcro
<
2023-01-17
>
nivekuil00:01:19

react18, what part of my code is adding 3ms to the render? View is a router-target of TopRouter

tony.kay05:01:22

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.

tony.kay15:01:19

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.

👀 2
tony.kay23:01:38

not react18 branc

tony.kay23:01:41

main at this pt

tony.kay23:01:06

sorry, forgot to push it.

tony.kay23:01:10

the branch name is drop-context

👍 2
nivekuil23:01:50

no issues so far!

Jakub Holý (HolyJak)13:01:09

works fine here as well but my app is so far trivial