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

Garbage collection/stale styles #387

Open
timothympace opened this issue Dec 9, 2019 · 0 comments
Open

Garbage collection/stale styles #387

timothympace opened this issue Dec 9, 2019 · 0 comments

Comments

@timothympace
Copy link

I was wondering if there is any notion of garbage collection in Aphrodite. When a component unmounts, and it's styles are no longer being used, is it possible to clean up just that components styles? I ask because I have a specific component that can end up generating a lot of different styles over it's lifetime.

I also noticed there is a resetInjectedStyle method, but it looks like it just resets the internal keys of which classnames have already been injected into the style tag. Maybe there could be another function that does a little more? When I saw this function I expected it to completely remove all styles for the passed in className. Is there any way to do that?

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

No branches or pull requests

1 participant