I have a parent and child component and simply take the input and on click I want to sort of update the parent. My onChange function works, but onClick I get the error message: Cannot read property 'name' of undefined - meaning that I never actually updated the parent. I cant figure out what am I doing wrong because as I understand, Im am passing the function correctly. Anyone knows? Thanks!

```
class Parent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {name: 'Frarthur'};
    this.changeName = this.changeName.bind(this);
 }

changeName(newName) {
    this.setState({
        name: newName
    });
}
handleInput() {
    console.log("helloooooo", this.state.name)
}

render() {
    return (
        <div>               
            <Child name={this.state.name} onChange={this.changeName} onClick={this.handleInput}/>
        </div>
    )
}

```

}

```
class Child extends React.Component {

constructor(props) {
    super(props);
    this.handleChange = this.handleChange.bind(this);
    this.handleInput2 = this.handleInput2.bind(this);
}

handleChange(e) {
    const name = e.target.value;
    this.props.onChange(name);
}

handleInput2() {
    this.props.onClick()
}

render() {
    return (
        <div>
            <h1>
                Hey my name is {this.props.name}!
            </h1>
            <input onChange={this.handleChange}/>
            <input type="submit" onClick={this.handleInput2}/>
        </div>
    )
}

```

}