Receive the Event Handler 2/3 not passing


#1


https://www.codecademy.com/en/courses/react-102/lessons/child-updates-parents-state/exercises/child-parent-receive-handler?action=lesson_resume&link_content_target=interstitial_lesson


Only getting a red X on the exercise, no error messages. None of the various changes I've tried have worked. Would like to blame it on the exercise being buggy but I know it's probably user error.


Child.JS

var React = require('react');

var Child = React.createClass({
  handleChange: function (e) {
  	var name = e.target.value;
  	this.props.onChange(name);
	},

  render: function () {
    return (
      <div>
        <h1>
          Hey my name is {this.props.name}!
        </h1>
        <select id="great-names" 
          onChange={this.prop.changeName}>
          <option value="Frarthur">
            Frarthur
          </option>

          <option value="Gromulus">
            Gromulus
          </option>

          <option value="Thinkpiece">
            Thinkpiece
          </option>
        </select>
      </div>
    );
  }
});

module.exports = Child;


#2
onChange = {this.props.onChange}

#3

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