Try to add a handler to my Node, React button component, to insert a row in DB, but I got an error, though I am just copying code from an example tutorial. What is wrong?
The method handlePost
is not defined in class Button
. But you are specifying it as this.handlePost
. Move the method inside class Button
.