Skip to content

docs: add Activity option to preserving state for removed components - #8611

Open
pawelkom88 wants to merge 1 commit into
reactjs:mainfrom
pawelkom88:activity-preserving-state
Open

docs: add Activity option to preserving state for removed components#8611
pawelkom88 wants to merge 1 commit into
reactjs:mainfrom
pawelkom88:activity-preserving-state

Conversation

@pawelkom88

Copy link
Copy Markdown

Description

The "Preserving state for removed components" section lists strategies for preserving component state when hidden.

With React 19.2, <Activity> provides a built-in way to hide UI subtrees while preserving state and DOM, with Effect cleanup and deprioritized background updates.

This PR adds <Activity> as an additional option alongside CSS hiding, lifting state up, and local storage.


Note for maintainers: Opening this in case <Activity> was simply not yet documented in this section. If omitting it here was intentional or I am simply wrong (e.g. keeping beginner guide focused on core patterns before introducing <Activity>), please feel free to close and let me know!

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant