-
Notifications
You must be signed in to change notification settings - Fork 49
No docs on onRequestChangeTab and onReset #57
Comments
You can see the usage in the App.js of the example/huge on line #62 From my understanding its used when a gets activated and want to set a sub route for the tabs child component. Here /profile/likes and /profile/bookmarks, so when the is active Can you past a bit more of the code so maybe you need something else? |
@LaszloDev Hi, thanks for pointing me to the example app. I think the example works because the base path remains the same- |
In general changing the route with |
@LaszloDev My bad! I was trying to navigate to a route |
But the docs are still missing. If you want I can write something up and send a pr. |
Would be great! |
@LaszloDev Thanks for your replies ! To explain the behaviour of <Tabs>
<Tab path="/" component={Index} />
<Tab path="/(profile|bookmarks)" component={ProfileBookmarks} />
</Tabs> From the tabbar, if you click on the 2nd tab, So you have to do the following: <Tabs>
<Tab path="/" component={Index} />
<Tab
path="/(profile|bookmarks)"
component={ProfileBookmarks}
onRequestChangeTab={() => history.replace('/profile')}
/>
</Tabs>
|
@LeoLeBras Cool. I'll try to finish this by tomorrow! |
Great ! |
@KarandikarMihir Any update on this work? |
Is there any documentation other than this on
onRequestChangeTab
andonReset
.What I want to do is just call
this.props.history.push('/my/path')
from a tab. But it throws an error saying-Invariant violation: there should always be only one screen active, not 0
.How do I navigate to a different route from a
Tab
?The text was updated successfully, but these errors were encountered: