react-native-navigation showInAppNotification 空白

react-native-navigation showInAppNotification blank

尝试使用 this.props.navigator.showInAppNotification

this.props.navigator.showInAppNotification({
  screen: "example.InAppNotification", 
  passProps: {
    title: 'Title',
    body: 'Body...'
  }, 
  position: 'bottom',
  autoDismissTimerSec: 3
});

screen InAppNotification 已注册,但看到内容为空白的通知:

有人可以帮忙吗?

example.InAppNotification:

export default class InAppNotification extends Component {
  render() {
    console.log(this.props);
    return (
      <View>
        <Text>
          {JSON.stringify(this.props)}
        </Text>
      </View>
    );
  }
}

尝试将 flex:1 添加到容器 View

export default class InAppNotification extends Component {
  render() {
  console.log(this.props);
  return (
    <View style={{ flex: 1 }}>
      <Text>
        {JSON.stringify(this.props)}
      </Text>
    </View>
  );
 }
}

您还需要正确注册 InAppNotification 屏幕