React 18 intermediate

I just finished the react 18 intermediate course. And I have deployed to vercel. However, I noticed that when you click on a game and you see the details. If you refresh that game details page you see 404 error

Hm, I get the same error, but it’s easy to fix
You need to add vercel.json file at the root of your project
With something like this

  "rewrites":  [
    {"source": "/(.*)", "destination": "/"}

More details in vercel doc: Configuring Projects with vercel.json | Vercel Docs

Thanks. I googled and I fixed it

1 Like