ReactJS: “this.props” is not a function when child component calls parent
I have written this code and am currently wrangling with a bug in an onClick event. I have two events, the onClick event on the child element and the onChange event on the top-level parent element. The expected behaviour should be to change the activeAccount variable currently held in the Container component. To do this, I added an onClick handler on the AccountRow component that should then call the top-level parent's onChange function. However, the line 'this.props.onChange(this.props.account)', in handleClick: function(e) { this.props.onChange(this.props.account); }, meant to call the