Form action breaking submissions in GatsbyJS

Hello,
I am using Netlify forms in GatsbyJS and Netlify would see the form, but not register any submissions. I found out this was due to the action="/thanks" redirect. Upon removing this the forms now work.

I am sure using the action is fine, I have used this before on other Gatsby builds with Netlify forms and it works. Am I missing something or is there a better way to do a redirect after the form submission. I am trying to keep it clean and feel this should work.

Thanks

Hey @Nuttifox,
We wrote a post about this exact thing!

This is how I’d recommend routing to your custom “thanks” page if possible:

Let us know if that helps or if we can answer any other questions on this.