How to pass and read query parameters from one page of your application to another by using the React Router
In this post we are going to see how you can register a new route in your React application and then pass information with the help of query parameters from one subpage to another.
Let us suppose the following scenario. You have page that contains a list of products with some basic information. You want to be able to click on an item of this list and navigate to a details-page, where the user can find more details about a specific product.
The following code examples are written in TypeScript. Visual Studio provides a great starting template for your React projects. I used the 4th generation of the React Router
First we need two routes for the scenario we just mentioned. The first route loads all the products, with only a limited information for each of them, from our backend and the second one loads the all the details to one product:Read the complete article