" in the "index.js" file; 2. Check "< under " Home >Web Front-end >Front-end Q&A >What should I do if the react routing page does not refresh? Solution to the react routing page not refreshing: 1. Check in the "index.js" file whether the App component is wrapped in "<BrowserRouter></BrowserRouter>"; 2. In " Add "exact" to "<Route exact path="" component={}/>" under The operating environment of this tutorial: Windows 10 system, react-router v5 version, Dell G3 computer. What should I do if the react routing page does not refresh? react-router5 The reason why the routing jump page does not refresh 1. In the index.js file Check whether the App component is wrapped in 2. Add exact under Installation of react-router Related expansion: React Router is a powerful routing based on React library that allows you to quickly add views and data flows to your application while keeping pages and URLs in sync. The three major frameworks currently popular on the front end all have their own routing implementations: Angular’s ngRouter React’s react-router Vue's vue-router Starting from version 4 of React Router, routes are no longer managed in one package. : react-router is the core part of the router code react-router-dom is used for browsers; react-router-native is used for native applications; Currently we use the latest React Router version which is the v5 version: In fact, there is not much difference between the version of v4 and the version of v5; Install react-router: Installing react-router-dom will automatically help us install the dependencies of react-router; Recommended learning: "react video tutorial" The above is the detailed content of What should I do if the react routing page does not refresh?. For more information, please follow other related articles on the PHP Chinese website!What should I do if the react routing page does not refresh?
<BrowserRouter></BrowserRouter>
. <Route exact path="" component={}/>
under yarn add react-router-dom
yarn add react-router-dom