react-native-navigator-router icon indicating copy to clipboard operation
react-native-navigator-router copied to clipboard

可以嵌套路由吗?

Open chunmu opened this issue 9 years ago • 1 comments

//当我这样配置的时候   push('/user/friends')会出错
//直接push('/friends')  就能匹配到  那我嵌套就没意义了。。
<Router history={createMemoryHistory('/')}>
        <Route path='/' component={createNavigatorRouter()}>
          <IndexRoute component={HomePage} />
          <Route path="/user">
            <Route path="/friends" component={FriendsPage}/>
          </Route>
        </Route>
      </Router>

chunmu avatar Oct 11 '16 04:10 chunmu

嵌套路由可以参考react-router项目的参考文档~

starlight36 avatar Oct 11 '16 04:10 starlight36