Skip to content

Commit 62d9870

Browse files
authored
reword batch transition updates (facebook#4304)
1 parent 23a5c2d commit 62d9870

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

website/blog/2024-10-23-the-new-architecture-is-here.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ startTransition(() => {
227227

228228
Separating urgent events from transitions allows for a more responsive user interface, and a more intuitive user experience.
229229

230-
Here's a comparison of the old architecture without transitions (left) and the new architecture with transitions (right):
230+
Here's a comparison of the old architecture without transitions and the new architecture with transitions. Imagine that each tile isn't a trivial view with a background color, but a rich component containing images and other components that are expensive to render. **After** using `useTransition` you avoid thrashing your app with updates and falling behind.
231231

232232
<div className="TwoColumns TwoFigures">
233233
<figure>
234-
<img src="/img/new-architecture/with-transitions.gif" alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000. There are less batch renders in comparison to the next video." />
235-
<figcaption>Rendering tiles with transitions to interrupt in-progress renders of stale state.</figcaption>
234+
<img src="/img/new-architecture/without-transitions.gif" alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000." />
235+
<figcaption><b>Before:</b> rendering tiles without marking it as a transition.</figcaption>
236236
</figure>
237237
<figure>
238-
<img src="/img/new-architecture/without-transitions.gif" alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000." />
239-
<figcaption>Rendering tiles without marking it as a transition.</figcaption>
238+
<img src="/img/new-architecture/with-transitions.gif" alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000. There are less batch renders in comparison to the next video." />
239+
<figcaption><b>After:</b> rendering tiles <em>with transitions</em> to interrupt in-progress renders of stale state.</figcaption>
240240
</figure>
241241
</div>
242242

@@ -251,15 +251,15 @@ Automatic batching allows React to batch together more state updates when render
251251
<div className="TwoColumns TwoFigures">
252252
<figure>
253253
<img src="/img/new-architecture/legacy-renderer.gif" alt="A video demonstrating an app rendering many views according to a slider input. The slider value is adjusted from 0 to 1000 and the UI slowly catches up to rendering 1000 views." />
254-
<figcaption>Rendering frequent state updates with legacy renderer.</figcaption>
254+
<figcaption><b>Before:</b> rendering frequent state updates with legacy renderer.</figcaption>
255255
</figure>
256256
<figure>
257257
<img src="/img/new-architecture/react18-renderer.gif" alt="A video demonstrating an app rendering many views according to a slider input. The slider value is adjusted from 0 to 1000 and the UI resolves to 1000 views faster than the previous example, without as many intermediate states." />
258-
<figcaption>Rendering frequent state updates with automatic batching.</figcaption>
258+
<figcaption><b>After:</b> rendering frequent state updates with <em>automatic batching</em>.</figcaption>
259259
</figure>
260260
</div>
261261

262-
In the old architecture (left), more intermediate states are rendered, and the UI keeps updating even when the slider stops moving. The New Architecture (right), renders fewer intermediate states and completes the rendering much sooner thanks to automatically batching the updates.
262+
In the old architecture, more intermediate states are rendered, and the UI keeps updating even when the slider stops moving. The New Architecture, renders fewer intermediate states and completes the rendering much sooner thanks to automatically batching the updates.
263263

264264
For more information, see [Support for Concurrent Renderer and Features](/docs/0.75/the-new-architecture/landing-page#support-for-concurrent-renderer-and-features).
265265

0 commit comments

Comments
 (0)