【发布时间】:2018-07-07 12:22:29
【问题描述】:
我正在尝试使用“react-router-native”的 getUserConfirmation 向路由添加身份验证,但永远不会调用 getUserConfirmation。我也找不到太多关于它的文档。
const getConfirmation = (message, callback) => {
//Here i will replace below code with authentication check
Alert.alert('Confirm', message, [
{ text: 'Cancel', onPress: () => callback(false) },
{ text: 'OK', onPress: () => callback(true) }
])
}
<NativeRouter getUserConfirmation={getConfirmation}>
......
</NativeRouter>
【问题讨论】:
标签: android react-native react-router-native