Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
REACT- How do I do to submit the data in the database?

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

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!