I'm having trouble with react-router's dynamic routes.
Here's how my dynamic route is set up:
<Route path="users/:id" element={<SomeComponent />} />
Whenever I redirect to this route through a link like this:
<Link to={`../users/${some_id}`}>
or through navigate() like this:
navigate(`../users/${some_id}`)
I'm able to load the page just fine. But when I refresh that page, or when I type in the same url manually, I get a 404 error.
I'm wondering why that is.
For the backend, I'm using laravel, and I've set up a catch-all route like this:
Route::view('/{path?}', 'app');