News for hackers. Stuff that matters.
Re:React Concurrent Mode by _bxg1 on Thursday October 24, 2019 @05:28PM (#21349386)
We need a little more than that, though. You can accomplish that right now with JS template string literals and innerHTML:

  function myComponent(props) {
    return `
      <div>
        ${props.name}
      </div>
    `
  }

  ...

  document.body.innerHTML = myComponent({ name: "Bob" });
The problem is that it always completely obliterates the DOM, instead of changing just the parts that need to change. The browser, of course, has plenty of information with which to do that in C++ instead of requiring the use of something like React. But for some reason it hasn't been implemented.
Re:React Concurrent Mode by dnautics on Thursday October 24, 2019 @06:03PM (#21349663)
You may be looking for morphdom, which is a very lightweight version of what you want, but of course browser support for this would be nice. https://github.com/patrick-steele-idem/morphdom
Re:React Concurrent Mode by numtel on Saturday October 26, 2019 @01:56AM (#21361983)
Lithtml implements declarative DOM using string literals like this very efficiently.

I'm of the opinion that sticking with React when Lithtml exists is just fear of writing vanilla classes.