Code not working

<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.>

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

```

//button.js
var React = require(‘react’);

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

Click me!

);
}
});

module.exports = Button;

//Talker.js
var React = require(‘react’);
var ReactDOM = require(‘react-dom’);
var Button = require(’./Button.js’);

var Talker = React.createClass({
talk: function () {
for (var speech = ‘’, i = 0; i < 10000; i++) {
speech += 'blah ';
}
alert(speech);
},

render: function () {
return ;
}
});

ReactDOM.render(
,
document.getElementById(‘app’)
);

<do not remove the three backticks above>

why isn't this working ?
2 Likes

Have you added foo = ‘bar’ to button ?

1 Like

you missed something in Talker.js render function:

render: function () {
    return <Button talk={this.talk}/>;
}
4 Likes

Thanks! I made the same mistake. Now it works for me too.

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