P
P
pcdesign2019-04-30 15:47:35
React Native
pcdesign, 2019-04-30 15:47:35

How to refresh the previous page when navigation.goBack() is clicked?

Here is the code that I use everywhere:

<Appbar.BackAction
            onPress={() => {
              this.props.navigation.goBack();
            }}

But for one case, when you click on the "Back" button, the previous page should be updated.
How to do it?
By default, the updated version is shown.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick, 2019-04-30
@DragonSpirit

As the simplest option, subscribe via addListnere to willFocus and check for the passed parameters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question