Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/content/reference/react/Activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ In this way, Activity can be thought of as a mechanism for rendering "background
#### Caveats {/*caveats*/}

- If an Activity is rendered inside of a [ViewTransition](/reference/react/ViewTransition), and it becomes visible as a result of an update caused by [startTransition](/reference/react/startTransition), it will activate the ViewTransition's `enter` animation. If it becomes hidden, it will activate its `exit` animation.
- If an Activity has a text node (plain text) as its child instead of an element, it won’t be rendered at all rather than hidden, because there’s no corresponding DOM node to apply visibility changes to.

---

Expand Down Expand Up @@ -1248,4 +1249,4 @@ When an `<Activity>` is "hidden", all its children's Effects are cleaned up. Con

If you're relying on an Effect mounting to clean up a component's side effects, refactor the Effect to do the work in the returned cleanup function instead.

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.
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.