Following the Facebook read.js tutorial , I get this error:
Uncaught TypeError: Property 'CommentList' of object [object Object] is not a function
Actually the actions.js page has:
Uncaught TypeError: object is not a function
Can someone explain the correct use?
My progress in the textbook
Import the following two javascripts:
http://fb.me/react-0.4.1.js http://fb.me/JSXTransformer-0.4.1.js
HTML - one line:
<div id="content"></div>
And javascript, or rather, <script type="text/jsx"> looks like this:
var CommentBox = React.createClass({ render: function() { return ( <div class="commentBox"> <h1>Comments</h1> <CommentList /> <CommentForm /> </div> ); } }); React.renderComponent( <CommentBox />, document.getElementById('content') ); var CommentList = React.createClass({ render: function() { return ( <div class="commentList"> <Comment author="Pete Hunt">This is one comment</Comment> <Comment author="Jordan Walke">This is *another* comment</Comment> </div> ); } });
source share