Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't render collapsed Collapse's children #507

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ddunkin
Copy link
Member

@ddunkin ddunkin commented Sep 3, 2021

This reduces DOM elements, SSR size, render time, unnecessary effects (e.g. network calls), etc. for content that isn't visible.

It could be problematic for any consumers that expect their components to be rendered while hidden.

This reduces DOM elements, SSR size, render time, unnecessary effects (e.g. network calls), etc. for content that isn't visible.

It could be problematic for any consumers that expect their components to be rendered while hidden.
@korbinancell
Copy link
Contributor

React Transition Group has props that handle unmounting on exit built in. It also looks like we already support using them https://github.com/Faithlife/styled-ui/blob/master/components/collapse/component.jsx#L89.
Is this to completely stop evaluation of the children?

@ddunkin
Copy link
Member Author

ddunkin commented Oct 27, 2021

Is this to completely stop evaluation of the children?

yes

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

Successfully merging this pull request may close these issues.

2 participants