(0,_reactNavigation.withOrientation)不是函数错误

时间:2018-11-22 18:23:42

标签: reactjs react-native react-navigation

我正在使用React本机应用程序,并尝试从其他项目中添加新组件。 我正在面对这个问题,有人知道吗? enter image description here

package.json

  

“反应导航”:“ 1.0.0-beta.9”

主要组件上的渲染功能

render() {
    return (
      <StyleProvider
        style={getTheme(
          this.props.themeState === "material" ? material : undefined
        )}
      >
        <Drawer
          ref={ref => {
            this._drawer = ref;
          }}
          open={this.props.drawerState === "opened"}
          type="overlay"
          tweenDuration={150}
          content={<SideBar />}
          tapToClose
          acceptPan={false}
          onClose={() => this.props.closeDrawer()}
          openDrawerOffset={0.3}
          panCloseMask={0.2}
          styles={{
            drawer: {
              shadowColor: "#000000",
              shadowOpacity: 0.8,
              shadowRadius: 3
            }
          }}
          tweenHandler={ratio => {
            return {
              drawer: { shadowRadius: ratio < 0.2 ? ratio * 5 * 5 : 5 },
              main: {
                opacity: (2 - ratio) / 2
              }
            };
          }}
          negotiatePan
        >
          <MyRouter />
        </Drawer>
      </StyleProvider>
    );
  }

1 个答案:

答案 0 :(得分:1)