-
Notifications
You must be signed in to change notification settings - Fork 98
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
component update clears innerHTML? #19
Comments
I wonder the type of since: let oldHtml = oldValue && oldValue.__html
let html = value && value.__html
if (!isStr(html)) {
elem.innerHTML = ''
} else if (html !== oldHtml) {
elem.innerHTML = html
} |
if Had better got a demo for debugging:) |
Yes, you're right. It is |
@fritx That's ok, I will check the behavior about inneHTML in this case with react, and make them consistent. |
Thanks! At this time, I prefer consistancy. Thank you! |
I think the version v0.0.13 of react-lite made consistancy with below change: let oldHtml = oldValue && oldValue.__html
let html = value && value.__html
if (html != null && html !== oldHtml) {
elem.innerHTML = html
} It won't be patched if html is equal to null or undefined such like regular react does. try the lastest version to confirm this problem was resolved:) BTW, I think regular react will provide lightweight version in the feature, or something like rollup \ tree shaking, make react-lite not necessary haha ~ just wait and see what will happen. |
@Lucifier129 haha~ ok, wait a sec |
Ok alright!
|
That's good:) |
issue should be closed 👍 |
It seems the innerHTML clears when one of the css style updates.
When I switch back to react, it works.
Is it a bug of react-lite?
The text was updated successfully, but these errors were encountered: