Root element is not rendering
See original GitHub issueHyperscript’s root element is not rendering allways. Because snabbdom.js line 184 … oldCh = oldVnode.children, ch = vnode.children;…
Problem:
var vnode = h('div#id.two.classes', [
h('span', 'This is text')
]);
patch(document.getElementById('container'), vnode);
output as
<div id="container"><span>This is text</span></div>
But may be:
<div id="container"><div id="id" class="two classes"><span>This is text</span></div></div>
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
React component not rendering in root - Stack Overflow
I am trying to display a simple form using react but I get the error "Target container is not a DOM element" despite...
Read more >ReactDOM.render is no longer supported in React 18
The error "ReactDOM.render is no longer supported in React 18. ... The root has a render() method that can be used to render...
Read more >ReactDOM – React
Render a React element into the DOM in the supplied container and return a reference to the component (or returns null for stateless...
Read more >I dont know but any of my element is not rendering on browser
I dont know but any of my element is not rendering on browser (Example) | Treehouse Community.
Read more >React Render HTML - W3Schools
React renders HTML to the web page by using a function called ReactDOM.render() . ... Note that the element id does not have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@avesus
The first argument to
h
is not a selector. It’s a description of the element including its tag name, its id and it’s static classes.I certainly think it is possible to build such a thing on top of Snabbdom.
I absolutely disagree with idea that
h('div#myId.myClass', ['This is text'])
should become<div id="myId" class="myClass">This is text</div>
Things specified in first argument are selector, but I’ve no complete understanding of such selectors at all because of hierarchical JSX Components idea. Is it possible to create true component wrapper to allow snabbdom to behave like React Components?