Passing props to component in React Router 4

后端 未结 6 1756
太阳男子
太阳男子 2021-02-05 06:39

I am new to react-router and I just started writing an app using react-router V4. I would like to to pass props to components rendered by and I am w

6条回答
  •  日久生厌
    2021-02-05 07:43

    I use render in combination with a defined method like so:

    class App extends React.Component {
      childRoute (ChildComponent, match) {
        return 
      }
    
      render () {
        
      }
    }
    

提交回复
热议问题