Too often I run into this:
Invariant Violation: _registerComponent(...): Target container is not a DOM element.
when making a new project / example.
The reason is I'm passing document.body but React's script is in head and body doesn't exist yet.
This is very common problem as I observed for beginners, as they tend to put their scripts in head but React samples use document.body as mounting point.
The real problem here is the message: you wouldn't believe that document.body "is not a DOM element" and assume something else is wrong, without realizing it may be empty at the time.
I suggest we show a different, more specific warning when second argument is null and document.body is null. Something like "Target container is null. Are you trying to mount to document.body before it is ready?"