Multiple Nested Routes in react-router-dom v4

后端 未结 6 1637
走了就别回头了
走了就别回头了 2020-11-28 22:02

I need multiple nested routes in react-router-dom

I am using v4 of react-router-dom

I\'ve got my

import { BrowserRo         


        
6条回答
  •  野性不改
    2020-11-28 22:42

    Use Switch component in router v4

    
    
      
      
      
        
          
    }/>

    export default class Home extends Component {
    render() {
        return (
          
    { this.props.children }
    ) } }

    I think this code shows the basic idea of using component.

提交回复
热议问题