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

Added StyleSheetId to the schema, solving a bug that kills react. #23

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

Conversation

michaelthatsit
Copy link

I'm working on a project called Malloci, which would be impossible without this component. but when trying to integrate Malloci into a react app, I realized htmlembed was reloading every styllesheet on the page anytime a component was created, resulting in page freeze up, and total loss off page formatting. adding styleSheetId to the component and styleId to the htmlcamvas code tells the component to only reload the CSS relevant to the component. This improves performance and prevents the side effect of format loss.

@lmcarreiro
Copy link

This PR seems to be a workaround for #19 and #22, thanks for sharing....

I'll try it here, but do you know if there is a way to handle this without having to provide the style id? It seems the issue doesn't happen because it reloads every stylesheet, as I understood, it issue happens because it does it many times instead of doing it once.

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.

2 participants