react-router例子npm install react-router-dom react-router to to activeClassNameactiveStyle pathcomponentsrender matchlocationhistory exact 例子```jsx import React from ‘react’ import { HashRouter as Router, Link, Switch, Route } from ‘react-router-dom’ import About from ‘./Views/About’ import Home from ‘./Views/Home’ import Users from ‘./Views/Users’ function App() { return ( Home About Users Users { console.log(props) // params: {id: “1”} return } }> ); } export default App ```