【发布时间】:2017-09-24 16:08:15
【问题描述】:
我正在使用 react-router-native 和弹出的 CRNA 应用程序。我已将<AndroidBackButton> 组件添加到我的<NativeRouter>,因为它显示in the docs,但它似乎没有触发。
有什么方法可以调试它以查看它是否没有正确获取值?我在我的应用程序中使用<Redirect> 和<Link> 进行路由,因此应该有可供RR 使用的历史记录项。
欢迎任何想法或想法。
export default props => (
<NativeRouter>
<AndroidBackButton>
<Switch>
<Route exact path="/" component={Flash} />
<Route path="/will_not_work" render={routeProps => <WillNotWork {...props} {...routeProps} />} />
<View style={styles.container}>
<Switch>
<Route path="/menu" render={routeProps => <Menu {...props} {...routeProps} />} />
<Route path="/car_compatibility" render={routeProps => <CarCompatibilityChecker {...props} {...routeProps} />} />
<Route path="/how_it_works" render={routeProps => <HowItWorks {...props} {...routeProps} />} />
<Route path="/app_demo" render={routeProps => <AppDemo {...props} {...routeProps} />} />
</Switch>
</View>
</Switch>
</AndroidBackButton>
</NativeRouter>
);
【问题讨论】:
标签: android react-native react-router react-native-android react-router-native