Receive the Event Handler Not Accepting Code


#1


 var React = require('react');

var Child = React.createClass({
  
  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;

No matter what I put in for select, it will not proceed, and there is no error code.


#2

I got the same problem, tried in several ways, still doesn't work.

var React = require('react');

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

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

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

module.exports = Child;

#3

I figure out where was the error

 <select id="great-names" onChange={this.prop.onChange}>

:slight_smile:


#4

working with props,not prop:)


#5

Yep, I solved in that way as I wrote :slight_smile:
btw, thanks for the feedback :slight_smile:


#6