Call function in parent from child component in React

Call function in parent from child component in React

Parent component

import React, { Component } from 'react'
import Child from './Child'

class Parent extends Component {

  functionToCall = () => {
    console.log("clicked")
  }

  render () {
    return (
        <Child functionToCall={this.functionToCall} />
    )
  }
}

Child component

import React, { Component } from 'react'

class Child extends Component {
  render () {
    return <button onClick={props.functionToCall}>Click here</button>
  }
}