Reactjs (0,_.withOrientation)不是函数错误
我正在使用React本机应用程序,并尝试从其他项目添加新组件。 我面临这个问题,有人有主意吗? package.json “反应导航”:“1.0.0-beta.9” 主组件上的渲染函数Reactjs (0,_.withOrientation)不是函数错误,reactjs,react-native,react-navigation,Reactjs,React Native,React Navigation,我正在使用React本机应用程序,并尝试从其他项目添加新组件。 我面临这个问题,有人有主意吗? package.json “反应导航”:“1.0.0-beta.9” 主组件上的渲染函数 render() { return ( <StyleProvider style={getTheme( this.props.themeState === "material" ? material : undefined )}
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>
);
}
render(){
返回(
{
这个.\u抽屉=ref;
}}
open={this.props.drawerState===“opened”}
type=“覆盖”
tweenDuration={150}
内容={}
龙头
acceptPan={false}
onClose={()=>this.props.closeDrawer()}
opendrawerofset={0.3}
panCloseMask={0.2}
风格={{
出票人:{
阴影颜色:#000000“,
阴影不透明度:0.8,
阴影半径:3
}
}}
tweenHandler={比率=>{
返回{
抽屉:{shadowRadius:ratio<0.2?ratio*5*5:5},
主要内容:{
不透明度:(2-比率)/2
}
};
}}
谈判潘
>
);
}
我用纱线代替npm解决了这个问题
您安装了哪个版本的react导航?你也能分享一下密码吗?谢谢,@HelmerBarcos。我添加了一些信息。该错误与react navigation中带有方向的方法有关。但是在您共享的代码中,我没有看到任何一行代码引用它。我没有在react导航中使用这些函数,也没有足够的文档。