I have a component that has several nested components, especially tabs, pills, etc. All of them are not visible even once.
I want to be able to set default state / details based on URL (or URL) parameters, but I donβt understand how to do this in React.
For example, I have a component with two tabs (bootstrap). When the user selects the second tab, I can change the URL with the parameter to refresh the page, the state of the currently selected tab is saved.
I have enabled Router but cannot find simple examples of what I am trying to achieve.
What I would like to do is access / parse the parameters of the query string and set the state and, ultimately, the properties of the child components.
Any advice is really welcome.
I can give an example of a tab component, but I donβt think it will add any value to the question.
source share