skip to Main Content

Javascript – useParams Returns Undefined values

I'm using react-router-dom 5.2.0 App.jsx `<Route path="/shop"> <ProductListPage /> </Route> <Route path="/shop/:page"> <ProductListPage /> </Route> <Route path="/shop/:gender/:category?"> <ProductListPage /> </Route> <Route path="/shop/:filter"> <ProductListPage /> </Route>` ProductListPage.jsx `import { useParams } from "react-router-dom"; export default function ProductListPage() { let { page…

VIEW QUESTION
Back To Top
Search