I want a component with a alert function to be activated when clicking on a button in a class-component.

### My Functional Component

```
import React from 'react'

export default function ConfirmationModal() {

    alert = () => {
        alert("whatsup hotdawg?")
    }

  return (
    <div>
        {this.alert()}
    </div>
  )
}

```

### In Class Component

i have this line that i would like to trigger the Alert method in the functional component onClick

```
<button>"ClickMe" onClick=<ConfirmationModal/> </button>

```

Any suggestions on how i can perform this would be much appreciated.