How to create a dynamic route in react with react router

  javascript, react-router, reactjs, routes

Please am finding it difficult to create a route in react router

I want to create a route like this <Route path="/:storeId" component={StorePage} />
But I also have a route like this /stores
Any time I go to the /:storeId page it loads the /users page
Am just confuse

Here is the code

      <Route exact path="/">
        <Home />
      <Route exact path="/stores">
        <Stores />
      <Route exact path="/:storeId">
        <StorePage />

Any help please.

Source: Ask Javascript Questions