Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary warning: An <IndexRoute> is not allowed for <TabsRoute>? #70

Open
nicholeuf opened this issue Dec 20, 2016 · 1 comment
Open

Comments

@nicholeuf
Copy link

This project contains components that are currently under active development and considered experimental. If it is something you can debug and fix, please consider submitting a pull request instead!


Version

Dependency Version
react-router-native 2.0.0-beta.0
react-router 3.0.0
react-native 0.37.0

Expected Behavior

First of all, thank you for creating this library and sharing with the community.

We are migrating from the react-router-native-flux library. I have an IndexRoute in a TabsRoute that sets the initial active route, similar to an IndexRedirect from react-router.

const to = (value) => (nextState, replace) => replace(value);

...

<TabsRoute path={routes.default} component={TabBarNavigation} >
   <IndexRoute onEnter={to(routes.cart)} />
   <Route path={routes.cart} component={CartContainer} />
   <Route path={routes.shop} component={Shop} />
   <Route path={routes.account} component={Account} />
</TabsRoute>

The IndexRoute definition is working just fine, except I am seeing a warning:

Warning: An <IndexRoute> is not allowed for <TabsRoute>

Actual Behavior

I believe an IndexRoute should continue to work in this configuration, but with no warning.

Steps to Reproduce

See router configuration above.

@Darkhorse-Fraternity
Copy link

we try indexRoute in stackRoute but it not work .props.children is undefine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants