404 error after submit with React

Hi

This is my first post and I’m french so I apologize in advance for my English !

My site : https://joffreysomon-portfolio.netlify.app/

I’ve two problems. First, I can’t deploy from a git repo. Yes I add the codes lines necessary to make it works :

In the HTML file

and

        <form name="contact" method="post" data-netlify="true" onSubmit="submit" className="form">
            <input type="hidden" name="form-name" value="contact" />

In the file containing the form.

Then, I deployed manually from the build and it worked !!!

BUT

When I click on the submit button of the app, I’ve a 404 error…

I searched on the forum but I’ve no results…

TY in advance !

Hi @Passemoildev,

Thanks for reaching out and welcome to Netlify’s Support Forums!

We have a Support Guide here on troubleshooting common issues with forms:

Could you review the guide to see if that helps with resolving the issue?

1 Like

Hi Melvin,

Thanks for your quick answer !

No I can’t read something helping me…

For remind : My API is build with React. I don’t know if I have to add something in the router (App.js).

Hope you can help me !

Sorry, I don’t understand. Are you saying you won’t read the docuementation Mel sent you to see if it contains the answer to your question?

Hi Elden,

My apologies regarding my English. I was saying that I read the docs and I didn’t see something to solve my problem.

Hi @chjames

Thanks for letting us know that the Support Guide was able to assit you in resolve the issue.

Hi @Passemoildev,

Thank you for following-up. Checking the deploy logs I do see that the form “contact” is being detected. I went to https://joffreysomon-portfolio.netlify.app/Contact and was able to submit on the contact form. I’m seeing a “thank you” page:


and I’m unable to reproduce the 404 error.

Could you share the steps to reproduce the issue?