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

[docs] Add a recommendation for hoisting GlobalStyles to static constant #28088

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Sep 1, 2021

GlobalStyles when rendered with styled-components update the <style> tag on each render (see #28070 for example). Adding a note on the documentation that will suggest to hoist the GlobalStyles to static const whenever possible.

@mnajdova mnajdova added the docs Improvements or additions to the documentation label Sep 1, 2021
@mnajdova mnajdova requested a review from eps1lon September 1, 2021 10:06
@mui-pr-bot
Copy link

mui-pr-bot commented Sep 1, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against e31cd0e

@siriwatknp siriwatknp merged commit 7ac8793 into mui:next Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants