Getting issue with simple ReactJs Example using from react website :
First i imported :
<script src="https://fb.me/react-0.14.3.min.js"></script>
<script src="https://fb.me/react-dom-0.14.3.min.js"></script>
Then i copy and pasted code :
// tutorial1.js
var CommentBox = React.createClass({
render: function() {
return (
<div>
<h1>Welcome</h1>
</div>
);
}
});
ReactDOM.render(<CommentBox/>, document.body);
When opened page nothing show. Also tried :
document.getElementById('example')
No error in console don't no what issue is.
I am using jquery in page and using Laravel with Blade templates let me know if that is issue.
Also tried to use external script :
<script src="/lib/react-example.js" type="text/jsx"></script>
This is my Live Server you can check here.
Thanks
ReactDOM.renderwith Immediately-Invoked Function eg.$(function() {ReactDOM.render(<CommentBox/>, document.body);})