I am tying to add authentication to routes using getUserConfirmation of "react-router-native", But getUserConfirmation is never getting called. I couldn't find much documentation on it as well.
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>