Ask coding questions

← Back to all posts
Target container is not a DOM element.
A036Nikhil

I am learning react but I don't know anythign about this error. I googled this error but not fully understand why i am getting this error

Answered by SixBeeps [earned 5 cycles]
View Answer
Voters
A036Nikhil
Comments
hotnewtop
SixBeeps

When does the error pop up? I'm seeing a slightly different error.

A036Nikhil

@SixBeeps Everytime, I run the script. What error you are seeing?

SixBeeps

@A036Nikhil Oh now I see it.

It looks like you never put a root element anywhere. According to their official codepen, this is how you'd set up the page