Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Tutorial 3 - Runtime Errors #87

Closed
Wobling opened this issue Oct 12, 2015 · 4 comments
Closed

Tutorial 3 - Runtime Errors #87

Wobling opened this issue Oct 12, 2015 · 4 comments

Comments

@Wobling
Copy link

Wobling commented Oct 12, 2015

When trying to use the CommentList and CommentForm I receive these errors.

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of CommentBox.

Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of CommentBox.

  var CommentBox = React.createClass({
    render: function() {
      return (
        <div className="commentBox">
          <h1>Comments</h1>
          <CommentList />
          <CommentForm />
        </div>
      );
    }
  });
  ReactDOM.render(
    <CommentBox />,
    document.getElementById('content')
  );

Any help is greatly appreciated.

@Wobling Wobling closed this as completed Oct 12, 2015
@Wobling
Copy link
Author

Wobling commented Oct 12, 2015

My Mistake, ReactDom needed to be at the end of the file.
ReactDOM.render(
,
document.getElementById('content')
);

@flacoman91
Copy link

thanks for this. I was getting stuck too!

@carlpoole
Copy link

I just became a victim of this too. Thanks for helping me fix it.

@githubuser441
Copy link

Thanks I read over it so I got also stuck on it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants