Url query Reach Route - React

0

I have the following problem:

I have an API in node.js that returns me id and name of products and supermarkets When I do a get in / supermarkets passing via url params /:idSupermercado I can get this parameter in the component by this.props.idSupermercado. Until then, okay.

I would like to know how do I get a url query.

Ex: the link at the end would look like this localhost: 3000 / search / idSupermarket /? product = potato

How do I get this? product = potato in the component?

I'm using reach router to work with the routes

    
asked by anonymous 05.12.2018 / 12:48

0 answers