I have an html that looks like this:
<head>
<script src="../js/vendor/jquery-2.1.0.js"></script>
<script src="../js/vendor/react.js"></script>
<script src="../js/jsx/todo.js"></script>
</head>
<body>
<div id="ola"></div>
<script src="../js/popup.js"></script>
</body>
My todo.js is a compiled TODO application from http://facebook.imtqy.com/react/ minus the last line.
My last popup.js:
$(function() {
React.renderComponent(TodoApp, document.getElementById('ola'));
})
But the page does not show anything! An error message is displayed on the console:
Uncaught TypeError: Object function (props, children) {
var instance = new Constructor();
instance.construct.apply(instance, arguments);
return instance;
} has no method 'mountComponentIntoNode' react.js:10052
I really don't know why this is so, I just tried to recreate from an example on a website. If it matters, it is in the chrome extension.
source
share