Ricky
@ricky.fm
14K followers 910 following 2.3K posts
React core team • Forbes 30 worst over 30
Posts Media Videos Starter Packs
Pinned
ricky.fm
Ricky @ricky.fm · Feb 14
me reading replies
Comic with 3 panes and micky mouse. Pane 1 says “hey guys! Guys who just got” pane 2: “yellled” pane 3 “aaat”
ricky.fm
I’m retired
ricky.fm
Ricky @ricky.fm · 16h
Part 2 is on the schedule, I’m just going to start the demo over and finish the talk from there
ricky.fm
Ricky @ricky.fm · 16h
Part 2 is at 5pm PT today
Reposted by Ricky
zeu.dev
zeu @zeu.dev · 1d
react <Activity> be like
natalie.sh
I RENDERED NOTHING
ricky.fm
Part 2 will be at React Conf tomorrow
ricky.fm
My talk is just suspended, I’ll finish it later
ricky.fm
My talk is just suspended, I’ll finish it later
ricky.fm
how do you resolve the promise in the test?
ricky.fm
The main struggle I see people have with act (which I have myself) is that all the updates aren’t flushed. The solution is usually to await act. If that doesn’t work, send me a test and I can take a look.
ricky.fm
Imagine that it didn’t exist. How would you flush the scheduler? You need to flush microtasks, scheduler tasks, and timer tasks somehow.
ricky.fm
How about before? :p
ricky.fm
How can I help?
ricky.fm
Oh let me take a look
ricky.fm
The flow there is:
- click
- transition: navigate
- suspend: fallback

Transitioning here should be fast so no time slicing needed, and then Suspense waits on the network data. Suspense will prewarm the tree while waiting on network, and use time slicing to yield to user input.
ricky.fm
The place time slicing can help (in any UI library) is for navigations because mounting the DOM for new pages is going to take more than a frame, so you want to yield to user input. But that’s Suspense, not transitions.
ricky.fm
A lot of people think startTransition is only for time slicing expensive updates, but that’s a side quest of the actual feature which is coordinating async with Suspense.
ricky.fm
Yeah this is a key thing, when things are async you have to design for lag
ricky.fm
I don’t think anyone has really solved the problem in JavaScript. React devs struggle when they want to opt out of reactivity, other library users struggle when they want to opt-in.
ricky.fm
This explains why useEffectEvent took so long to ship. We tried a lot of alternatives, but they all hit this problem.

We decided to ship it with all the constraints, because it’s useful even when constrained, but I’m still hoping for a general solution.
danabra.mov
the API is powerful because it completely turns off reactivity for the code inside. however, that’s also very dangerous if used all over the place because you don’t know where along the chain reactivity might disappear. the constraints prevent that
ricky.fm
we did plenty of talks that explained "async react" over the years, but all of the talks were forward facing, like "in the future, you'll be able to do x,y,z".

all those features exist now, but i think people forgot or don't know all the benefits of those features.
ricky.fm
i think what i want to do in this talk is to kind of throw out the CPU benefits, because they really don't matter, and explain Fiber and concurrent rendering just as async features built into react.
ricky.fm
yeah the time slicing demo was a classic. it's so good that everyone still talks about it, but it over shadowed the second half of the talk for the I/O benefits and the vision for "async react"
ricky.fm
You should check out my talk next week