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

Preactement: avoid rerender on hydrate #30

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Conversation

naltatis
Copy link
Contributor

Currently, preactement removes existing children when hydrating. This can lead to flicker and reflow. Skipping the innerHTML = '' should be perfectly fine. I'm using this modified version for a couple of month now in a project without issues. I would like to see this change in this repo as well.

All the best, naltatis

Copy link
Owner

@jahilldev jahilldev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! 👍

@jahilldev jahilldev merged commit 50f00cc into jahilldev:main Oct 23, 2024
1 check passed
@jahilldev
Copy link
Owner

Hey @naltatis,

I've just published v1.9.0 with your changes:
https://github.com/jahilldev/component-elements/releases/tag/preactement%401.9.0

I bumped the minor as some might be relying on innerHTML = '', but can't think of why right now. Even so, kinda a breaking change, so 1.9.0 it is!

Thanks again 👍

@naltatis
Copy link
Contributor Author

Thanks for merging and the quick release 🤘

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