handleChange function "e" parameter


Can some one please explain me how work handleChange function step by step. Why there is "e" parameter in this function, and why when we call this function inside we use no parameters.

var Child = React.createClass({
  handleChange: function(e) {
    var name = e.target.value;

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


This is an event, which when it occurs will pass the EventObject to the handler via the provided variable (parameter), e. We could name it anything, but e is very commonly used to signify event object. The object is transient and only remains in memory until the next event is triggered. Its properties are all the details and methods applicable.


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