How does react4 nest routing? My secondary route is not displayed and does not report an error.

here is the configuration of the home route

class RouterMap extends React.Component {
    render() {
        return (<BrowserRouter><div>
            <Switch>
            <Route path="/" exact component={Home}/>
             <Route path="/users" component={Users}/>
            <Route path="/city" component={City}/>
            <Route path="/city2" component={City2}/>
            <Route path="/result" component={Result}/>
            <Route match="match" path="/dashboard" exact component={Dashboard}/>
            <Route path="/dashboard/id"  component={Dashboard200}/>
            </Switch>
        </div></BrowserRouter>)
    }
}

here is the configuration of the child routing page

class Dashboard extends React.Component {
    componentDidMount(){
        //console.log(this.props)
    }
    render() {
        console.log(this.props)
        const match=this.props.match
        return (<div>
            <div>123</div>
            <Switch>
                <Route path={`${match.url}/2`} component={Dashboard6}/>
                <Route path={`${match.url}/3`} component={Dashboard1}/>
                <Route path="/2" component={Dashboard1}/>
            </Switch>
         </div>)
    }
}
Mar.24,2021

you can use react-router-config, download modularization to introduce
import {renderRoutes} from 'react-router-config'

const routes = [
  { component: App,
    routes: [
 
      { path: '/payAuthorization',
        exact: true,
        component: PayAuthorization,
        onEnter: () => {bridge.doAction('setTitle', { title: '' });}
         routes: [
         { path: '/successMsg',
          component: SuccessMsg
        } 
        ]
      }
    ]
  }
]
// ...
<Router basename={basename}>
     <div>{renderRoutes(routes)}</div>
   </Router>,

notice that

{renderRoutes (routes)} < / div >

is added to the component.

Thank you, it has been solved, mainly because there can be no exact,

Menu