Dynamic Routes in React App

i have a React App that takes an /:id and performs a fetch based on the id. When i start my app locally everything works, but on render.com i get an 404 Not Found Error.

Any idea what I’m doing wrong? I thought about adding a rewrite rule but im not entirely sure how those work and if that is even the problem.

Thank you

Hi Aaron,

Thanks for reaching out.

If it’s a single page react app, then a rewrite rule pushing everything to index.html would likely be the solution. More on this in the docs: Redirects and Rewrites

Hope that helps


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.