How to make dynamic paths from selected filter in react + react-router-dom (not Next)

Hello everyone! I have a question to you. I have a catalog of products with filter by categories / groups inside these categories etc. Currently i'm using search params to get ID's of these categories and groups from url and then fetch the data from an API (it looks like mysite/products?category-id=3&group-id=5 for example). So then i change something in my filter it applies these changes to url and it works perfectly fine, but as my colleague told me, it has some SEO problems. So now i have to change my method to dynamic paths such as mysite/products/category/group/item. So the question is - how to implement this method in react + react-router-dom (not next) and fetch the data the correct way? Do i need to use useParams? And second question is - how to make breadcrumbs based on this method? Because now it's just a static catalog page breadcrumb and dynamic breadcrumb for product item. Thanks in advance!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server