7.The Render Function

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
7. The Render Function

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Seem to have a problem. I might have fooled around with the app.js code and now both new.js and app.js are not linking properly. If there was a reset I would use it.

Error is: Make sure that you are saving the result of React.createClass() as a var named MyComponentClass

```

Replace this line with your code.
app.js

var React = require(‘react’);
var ReactDOM = require(‘react-dom’);

var MyComponentClass = React.createClass({
render: function () {
return

Hello world

;
}

});
React.createClass()= MyComponentClass
ReactDOM.render(
,
document.getElementById(‘app’)
);
new.js

var React = require(‘react’);
var ReactDOM = require(‘react-dom’);
var MyComponentClass = React.createClass();

var componentBlueprint = {};

var ReactDOM = require(‘react-dom’);
var componentBlueprint = {
render: function () {
return

Hello world

;
}
};
Var MyComponentClass = React.createClass(componentBlueprint);
<do not remove the three backticks above>

This line may be the cause of the problem in app.js.

These lines may be the cause of the problem in new.js.

var should be lowercase.

Thank you mtf. The capital v was the problem. Can’t see how I missed it.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.