Hope you're going great :)
My React Router is not responding to changes in URL through params. Here's the App.js:
import React, { useContext } from "react";
import { Switch, Route } from "react-router";
import NavBar from "../Navbar/Navbar";
import Homepage from "../Homepage/Homepage";
import Shops from "../Shops/Shops";
import Products from "../Products/Products";
import Games from "../Games/Games";
import Gamepage from "../Commons/Gamepage";
const App = () => {
  
  return (
    <React.Fragment>
      <NavBar token={token} />
      <Switch>
        <Route path="/homepage" component={Homepage} />
        <Route path="/shops" component={Shops} />
        <Route path="/products" component={Products} />
        <Route path="/games" component={Games} />
        <Route
          path={`/games/:id`}
          render={(props) => <Gamepage {...props} />}
        />
        <Route path="/" component={Homepage} />
      </Switch>
    </React.Fragment>
  );
};
export default App;
Here's the Gamepage:
import React from "react";
const Gamepage = () => {
  return <h1>Hello</h1>;
};
export default Gamepage;
And here's the link:
<Link to="/games/euromillions">
        <div className="games-list">
          <h4>Euromillions</h4>
          <img src={euro} alt="euro" />
        </div>
      </Link>
Every other Link (like in Navbar) is working... But when I click this specific link, it doesn't work, stays in Games page :/
I've tried:
- Change params name;
- Change Gamepage component to something else;
- Change Link tag to other place (doesn't work with params);
 
     
     
    