This is a simple React.js script, but couldn't find the cause. I think this issue is a common doubt for initial React developers. Please help.

The error showing is "*this.props.parentClick is not a function*".

```
class App extends Component {
  constructor() {
    super();
    this.state = {
      name: 'React'
    };

  }
  parentClick()  {

  }
  render() {
    return (
      <div>
         <Test childClick={this.parentClick}/> 
      </div>
    );
  }
}
class Test extends Component{
   constructor(props){
     super(props);
     this.childClick = this.childClick.bind(this);
   }
   childClick(){
     this.props.parentClick();
   }
   render() {
    return (
      <div>
        <button onClick={()=>this.childClick()}>click</button>
      </div>
    );
  }
}  

render(<App />, document.getElementById('root'));

```

Here is the code in stackblitz.com.
<https://stackblitz.com/edit/react-3zt7qm>