Hi everyone! Sorry for the newbie question. I’m new to react and am trying to figure out react-router-dom deployment with netlify. everything works totally fine with my local, but once i deploy to netlify it doesn’t work
Everything deploys fine, but when I click my links (for example to go to netlify.app/MY_OTHER_COMPONENT) it appends the URL as expected although the URL throws a 404. For example, this URL works fine on my local but not in prod
NOTE: I do not have any _redirects file yet - might this be the issue?
Generally speaking though, when clicking a route link on a page they work, but when either refreshing the page, or navigating directly they don’t, so it is strange the links you have don’t work.
Ok, so looking at your page, each See more button is a inside a form, and makes a GET request to the new route (which explains the ? on the end) instead of links. As someone who hasn’t worked with React a lot, I can’t say why this is the case, but I believe removing these buttons from forms, and making them links will solve most of the issues you are having.
Ah, I see <Card /> is a component you have written.