Essayer utilisation this.props.navigator.showInAppNotificationréagir-navigation native showInAppNotification vide
this.props.navigator.showInAppNotification({
screen: "example.InAppNotification",
passProps: {
title: 'Title',
body: 'Body...'
},
position: 'bottom',
autoDismissTimerSec: 3
});
écran InAppNotification est enregistré, mais voir une notification avec un contenu vide:
Quelqu'un peut-il aider à ce?
example.InAppNotification:
export default class InAppNotification extends Component {
render() {
console.log(this.props);
return (
<View>
<Text>
{JSON.stringify(this.props)}
</Text>
</View>
);
}
}
quel est le contenu de. exemple.InAppNotification –
ajoutez-le à la question. –