React Native Navigation - [FAB]浮动操作按钮未按预期显示

Anu*_*esz 5 android react-native react-native-android react-native-navigation wix-react-native-navigation

我正在使用React-native-navigation(wix),并且存在与React本机FAB(浮动操作按钮)相关的问题.

要求 - 我需要在componentDidMount生命周期方法中设置FAB,如下所示

componentDidMount() {
  this.props.navigator.setButtons({
    fab: {
     collapsedId: "someFormName",
     ...getAddButtonStyle()
    }
  });
}
Run Code Online (Sandbox Code Playgroud)

我管理this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));全球,它按预期工作.我在这里遇到的问题是当我将其设置在内部时,FAB没有在我的UI中显示,componentDidMount()但如果我设置为 static button完美的工作.此外,它完美地完成了内部render()功能.

我很困惑,为什么我不能在componentDidMount()[初始页面加载] 内设置按钮?