You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/blog/2024-10-23-the-new-architecture-is-here.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,16 +227,16 @@ startTransition(() => {
227
227
228
228
Separating urgent events from transitions allows for a more responsive user interface, and a more intuitive user experience.
229
229
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.
231
231
232
232
<divclassName="TwoColumns TwoFigures">
233
233
<figure>
234
-
<imgsrc="/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
+
<imgsrc="/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>
236
236
</figure>
237
237
<figure>
238
-
<imgsrc="/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
+
<imgsrc="/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>
240
240
</figure>
241
241
</div>
242
242
@@ -251,15 +251,15 @@ Automatic batching allows React to batch together more state updates when render
251
251
<divclassName="TwoColumns TwoFigures">
252
252
<figure>
253
253
<imgsrc="/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>
255
255
</figure>
256
256
<figure>
257
257
<imgsrc="/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>
259
259
</figure>
260
260
</div>
261
261
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.
263
263
264
264
For more information, see [Support for Concurrent Renderer and Features](/docs/0.75/the-new-architecture/landing-page#support-for-concurrent-renderer-and-features).
0 commit comments