Skip to content

Commit 6934a24

Browse files
committed
wip
1 parent ae026ef commit 6934a24

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/content/blog/2025/04/01/react-labs-what-we-have-been-working-on-april-2025.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -10041,6 +10041,16 @@ You can use `Activity` save state for parts of the UI the user isn't using, or p
1004110041

1004210042
Let's look at some examples improving the View Transition examples above.
1004310043

10044+
<Note>
10045+
10046+
**Effects don’t mount when an Activity is hidden.**
10047+
10048+
When an `<Activity>` is `hidden`, Effects are unmounted. Conceptually, the component is unmounted, but React saves the state for later.
10049+
10050+
In practice, this works as expected if you have followed the [You Might Not Need an Effect](/learn/you-might-not-need-an-effect) guide. To eagerly find problematic Effects, we recommend adding [`<StrictMode>`](/reference/react/StrictMode) which will eagerly perform Activity unmounts and mounts to catch any unexpected side effects.
10051+
10052+
</Note>
10053+
1004410054
### Restoring state with Activity {/*restoring-state-with-activity*/}
1004510055

1004610056
When a user navigates away from a page, it's common to stop rendering the old page:
@@ -11338,7 +11348,6 @@ root.render(
1133811348

1133911349
</Sandpack>
1134011350

11341-
1134211351
### Pre-rendering with Activity {/*prerender-with-activity*/}
1134311352

1134411353
Sometimes, you may want to prepare the next part of the UI a user is likely to use ahead of time, so it's ready by the time they are ready to use it. This is especially useful if the next route needs to suspend on data it needs to render, because you can help ensure the data is already fetched before the user navigates.
@@ -12622,14 +12631,6 @@ root.render(
1262212631

1262312632
</Sandpack>
1262412633

12625-
### How Activity Works {/*how-activity-works*/}
12626-
12627-
TODO:
12628-
- deprioritizes render
12629-
- unmounts effects
12630-
- view transitions exit/enter
12631-
- link to docs
12632-
1263312634

1263412635
## React Performance Tracks {/*react-performance-tracks*/}
1263512636

0 commit comments

Comments
 (0)