在导航器弹出窗口上反应 Native Pass 属性 [英] React Native Pass properties on navigator pop

查看:25
本文介绍了在导航器弹出窗口上反应 Native Pass 属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的本机应用程序上使用 NavigatorIOS.我想在导航回之前的路线时传递一些属性.

I'm using NavigatorIOS on my react native app. I want to pass some properties when navigating back to previous route.

一个例子:我在一个表单页面.提交数据后,我想回到之前的路线,根据提交的数据做一些事情

An example case: I'm in a form page. After submitting data, I want to go back to the previous route and do something based on the submitted data

我该怎么做?

推荐答案

当你推送新路由并在弹出到上一个路由之前使用表单数据调用它时,你能否在导航器道具上传递一个回调函数?

Could you pass a callback func on the navigator props when you push the new route and call that with the form data before you pop to the previous route?

这篇关于在导航器弹出窗口上反应 Native Pass 属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆