React router - Nested routes not working

前端 未结 3 1176
一整个雨季
一整个雨季 2020-12-24 07:36

My goal is to have http://mydomain/route1 render React component Component1 and http://mydomain/route2 render Component2. So, I thought it\'s natural to write the routes lik

3条回答
  •  天涯浪人
    2020-12-24 07:57

    I was solving similar problem (Component2 was not rendered) and nested routes wasn't working because I forgot to render {this.props.children} in Component1

提交回复
热议问题