Passing a prop into the child element

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>
Stuck at this exercise:

<Below this line, add a link to the EXACT exercise that you are stuck at.>
React.js Part II 4. Build a Stateless Component Class - step 4/6

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
I cannot figure out why it is incorrect.

Below my Child.js

``` var React = require('react');

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

Hey, my name is {this.props.name}!


});
});
---

---

Below my Parent.js

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

var Parent = React.createClass({
getInitialState: function() {
return { name: ‘Frarthur’ };
},

render: function() {
return



;
}
});

Child.js


var React = require('react');

var Child = React.createClass({
    render: function() {
        return (<h1>Hey, my name is {this.props.name}!</h1>
        );}
});

Check Line 6: I believe you have the bracket misplaced.

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