简体   繁体   中英

Why can't access params in TabRouter in react-navigation?

In react-navigation I am navigating doing props.navigate("Page", { index: 1 }) in a react component.

So I am creating a TabRouter with createNavigator in a way like this:

import {
    TabRouter,
    createNavigator
} from "react-navigation";

createNavigator(TabRouter(Page: {
    screen: Page,
    path: "page/:page"
}))(NavView)

Then I can't access to navigation.state.params.index , but I can if using StackRouter instead.

any thoughts?

拉取请求旨在将setState添加到TabRouter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM