We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在业务代码里面如何获取navigator的引用呢? 比如我在初始化的代码如下: <CLNavigator initialRoute={{ name:"home", page:() => <Home/> }} />
<CLNavigator initialRoute={{ name:"home", page:() => <Home/> }} />
那我如何在Home组建中获取到navigator得引用呢?
The text was updated successfully, but these errors were encountered:
最简单同时也比较好的办法是使用global
<Navigator ref={(nav) => { global.nav = nav; }}/>
这样在整个rn模块里,你就可以直接使用global.nav了。
Sorry, something went wrong.
No branches or pull requests
在业务代码里面如何获取navigator的引用呢?
比如我在初始化的代码如下:
<CLNavigator initialRoute={{ name:"home", page:() => <Home/> }} />
那我如何在Home组建中获取到navigator得引用呢?
The text was updated successfully, but these errors were encountered: