So here is my functional Button component
export const MyButton = (props) => {
return (
<button className="myButton">{props.text}</button>
)
}
And I used it in another page like
<MyButton text="Update" onClick={this.checkIt} />
Where that checkIt function is just console logging the state of the class I used it in. But for some reason, it isn't registering the click at all. How can I go about solving it? I implemented in a similar way for input field where I used the props.onChange(event.target.value) and that is working properly.