How the react-router4 outer route obtains the path of the match of the child route

the hash,location.hash used is empty

//index.js
    <Router>
      <Switch>
        <Route path="/" exact render={() =><Redirect to="/main"/>}/>
        <Route path="/login" exact component={Login} />
        <Route path="/main" component={Main} />
        <Route component={NoMatch} />
      </Switch>
    </Router>

// main.js
<div>    
<Breadcrumb> //match/main,path:/main/child,localtionpathname/main/child/:idpath
<div>
  <Header/>  
  <Breadcrumb params={this.props} />
  <Route exact path={`${match.url}/index`}  component={ Index } />
  <Route exact path={`${match.url}/base/:id`}  render={ () => <Base {...props} /> 
  <Footer />
</div>
Sep.09,2021

I tried using hash. Localtion can match the path you want / main/child/:id. The path is localtion.hash

.
Menu