Hello. I’m building a simple visitors’ book, using React on the front-end, and the back-end is sending the data to a MongoDB/Mongoose database.
I started with the ~starter-react set-up, and took it from there.
It seems to work okay with action/method in the form element - all the form data arrives and goes into the database - but I’m now trying to handle the POST in the handleSubmit(event) method. I’ve cobbled together something from Google searches, which uses ‘fetch’. When I console.log the server.js file, the body is empty. I’m clearly a beginner, and I don’t understand everything that’s going on!
My project is here glitch.com/~lpgm3.