I am very confused as to why I am getting this error in the console. I have read all the dos and as far as I know I am doing this right.
On my page I have a
<div id="aisis-writer"></div>
where I want my react element tied to. I have then created a simple React component that renders nothing:
var AisisWriter = React.createClass({
getInitialState: function(){},
componentDidMount: function(){},
render: function(){
return null;
}
});
React.render(
<AisisWriter />,
document.getElementById('aisis-writer')
);
Very basic. When I load the page I see: Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element.
So I think, ok maybe I misspelled something here, so in the console I do:
document.getElementById('aisis-writer');
And I get back:
<div id="aisis-writer"></div>
So am I completely missing something? Why am I getting this error?