First issue, the Button
component has a title
prop instead of having
as a child. Second issue is that you have a bunch of syntax errors and are not calling functions (or binding) correctly. If you fix that, then it should work fine; for example:
alert = (msg) => {
console.log(msg)
}
onDeleteBTN = () => {
this.alert(' OnDelete')
}
render() {
return (
);
}
Note:
alert()
function is supposed to do, so I made a dummy one that logs to console.onDeleteBTN()
or binding.