javascript - React Native Pass properties on navigatorIOS pop -
i'm using navigatorios on react native app. want pass properties when navigating previous route.
an example case: i'm in form page. after submitting data, want go previous route , based on submitted data
how can pass state variables of current element previous route when using pop go back?
any code sample appreciated.
this classic example of trivially solved redux or other centralized state store.
without that, behavior go "back" via navigatorios's pop
method? takes no arguments, doubt that'll work @ all.
the best use push
, can define route
contain form data in passprops
:
this.props.navigator.push({ title: navigatoriosexample.title, component: navigatoriosexamplepage, backbuttontitle: 'custom back', passprops: { formdata }, });
but really, use redux.
Comments
Post a Comment