-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 cache to avoid unnecessary jsx dynamic import and theme getting #43139
[docs] Add cache to avoid unnecessary jsx dynamic import and theme getting #43139
Conversation
…mport and theme getting
Netlify deploy previewhttps://deploy-preview-43139--material-ui.netlify.app/ Bundle size report |
@siriwatknp I added a cache to avoid every time the components mount will load the jsx asserts and get theme seting from window again. It is an enhancement for #42879. |
With that modification, you will need to refresh the page to update the applied theme. Otherwise, I don't see how you can get a different |
@alexfauquette Yes, only refresh the page can update the theme, I think the inject theme will not change frequently. |
@siriwatknp Can you help to review this PR? |
@mnajdova Can you help to review this? |
@alexfauquette Thanks. Do you now when will use the next branch to deploy the document site again? I want to verify my function. |
You can already test on https://deploy-preview-43139--material-ui.netlify.app/ Notice the format |
@alexfauquette I have verified my function, and it is working! I have created anothor MR to update the jsx name exposed in window. It should be After that, I will create a public chrome extension, so it can be used by everyone. |
…mport and theme getting