GithubHelp home page GithubHelp logo

Comments (10)

Lucifier129 avatar Lucifier129 commented on August 28, 2024

I wonder the type of currConver.editor, it's string or not?

since:

let oldHtml = oldValue && oldValue.__html
let html = value && value.__html
if (!isStr(html)) {
  elem.innerHTML = ''
} else if (html !== oldHtml) {
  elem.innerHTML = html
}

from react-lite.

Lucifier129 avatar Lucifier129 commented on August 28, 2024

if currConver.editor is equal to undefined, innerHTML will also be clears.

Had better got a demo for debugging:)

from react-lite.

fritx avatar fritx commented on August 28, 2024

Yes, you're right. It is undefined 😢
But this is different with React. Is it better to make them consistent? ;)

from react-lite.

Lucifier129 avatar Lucifier129 commented on August 28, 2024

@fritx That's ok, I will check the behavior about inneHTML in this case with react, and make them consistent.

from react-lite.

fritx avatar fritx commented on August 28, 2024

Thanks! At this time, I prefer consistancy. Thank you!
But maybe in the future, react-lite's simplicity and lightweight wins!

from react-lite.

Lucifier129 avatar Lucifier129 commented on August 28, 2024

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.

from react-lite.

fritx avatar fritx commented on August 28, 2024

@Lucifier129 haha~ ok, wait a sec

from react-lite.

fritx avatar fritx commented on August 28, 2024

Ok alright!

  • It won't be patched if html is equal to null or undefined
  • It will be patched if html is equal to empty string

from react-lite.

Lucifier129 avatar Lucifier129 commented on August 28, 2024

That's good:)

from react-lite.

dhenson02 avatar dhenson02 commented on August 28, 2024

issue should be closed 👍

from react-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.