I have developped all my frontend in REACT based on the use of 2 json files. Now, I want to submit a form, push&fetch data, save data from input fields when refreshing a tab. I have a potential architecture for my datatabse (MYSQL). What should I do next to get/push this info on my database? I never done web front/backend before.
Here my code
You can use axios, and for method you can use POST like this:
handleSubmit = (event) => {
fetch('http://localhost:3000/store-data', {
method: 'POST',
}).then(function(response) {
console.log(response)
return response.json();
});
event.preventDefault();
}
You use this event handleSubmit on your button.