Developer
Developer

Reputation: 432

how can i send callback to my parent view when call Actions.pop in react-native-router-flux

I am using https://github.com/aksonov/react-native-router-flux for navigation in react native.How can I send callback to my parent view when I call pop actions on it.

onPressed() {
    Actions.pop();
}

This is how I call pop action on it but I need to send updated value to previous view.

Upvotes: 1

Views: 1598

Answers (1)

Developer
Developer

Reputation: 432

will I finally solve it by calling empty refresh with props after delay

Actions.popTo('pageOne');
    setTimeout(() => {
        Actions.refresh({name:'zzzzar'});
        console.log("zzzz");
    }, 10);

Upvotes: 2

Related Questions