Stuck on 3: Pass the event handler


#1

I checked the other posts and think the code looks correct. Also tried to log out and log in again. But when I pressed the run button, it keeps spinning and nothing happens. Please help. Thanks!


var React = require('react');
var ReactDOM = require('react-dom');
var Child = require('./Child');

var Parent = React.createClass({
  getInitialState: function () {
    return { name: 'Frarthur' };
  },
  
  changeName: function (newName) {
    this.setState({
      name: newName
    });
  },

  render: function () {
    return (
    	<Child 
    		name={this.state.name}
        onClick={this.changeName} />
    );
  }
});


#2

Updated firefox and now it works. Now stuck on the next session, still the same problem: pressed run and spinning forever, and nothing happens.


#3

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