DEV Community

Discussion on: Building a Simple Virtual DOM from Scratch

Collapse
 
maiermic profile image
Michael Maier

The linked CodeSandbox examples don't run. I get

Cannot read property 'replaceWith' of null

It seems that a differnt index.html is used in the sandbox. Hence, the target element #app to mount to is not found

let $rootEl = mount($app, document.getElementById('app'));
Enter fullscreen mode Exit fullscreen mode