Top "React-router-dom" questions

Use this tag for questions regarding DOM use and bindings of React Router v4, v5, and v6.

React-router: never unmount a component on a route once mounted, even if route change

I have a React application that declares some routes : <Switch> <Route exact path={'/'} render={this.…

reactjs react-router react-redux react-router-dom
react-scroll | How to scroll to a specific targeted component when clicking on Navbar Link

I am making a single scroller page using React and want to navigate to a specific section of the page. …

reactjs scroll react-router-dom anchor-scroll react-scroll
React Router v4 - Keep scrolling position when switching components

I have two <Route>s created with react-router. /cards -> List of cards game /cards/1 -> …

javascript reactjs scrollview react-router-v4 react-router-dom
React: reading data passed as parameter in history.push

I am new to react and I am trying to send some data as parameter in history.push. Basically I …

reactjs react-router react-router-v4 react-router-dom react-16
What's the Difference between the React Router v4 Router Types?

I have tried to learn some React basics on YouTube and from the official docs and I encountered multiple different …

reactjs react-router react-redux react-router-v4 react-router-dom
How to solve prop spreading is forbidden in custom route component?

How to solve prop spreading is forbidden in custom route component? eslint: prop spreading is forbidden on line 3 and 6 const …

reactjs eslint react-router-dom
Is it possible to use material-ui button navigation with react-router?

I have a web app that I'v designed with material-UI and as you can see below I'm using Button navigation …

reactjs react-router material-ui react-router-dom
React+redux-form - redirect after submit

I am using react-router-dom v4 . How can I redirect to the page after form submit success? I followed that tutorial …

reactjs redux redux-form react-router-dom
Reactjs - `component` vs `render` in Route

I have two doubts regarding usage of Route from react-router-dom(v4.3.1): When do we use component vs render in Route: &…

javascript reactjs routes react-router-dom
How to make a Material UI react Button act as a react-router-dom Link?

How can I make a Material UI react Button component act as a Link component from react-router-dom without losing it's …

javascript reactjs react-router material-ui react-router-dom