0

I have five screen,

Screen - A,
Screen - B,
Screen - C,
Screen - D,
Screen - E

Now, am passing screen "C" key via state param in order to goBack from screen "E" to screen "B". And its working perfectly,

But i need to trigger a refresh at Screen B, how to pass a function from screen E to screen B ?

If it's direct going back and refresh means for example - Screen E to Screen D then we can easily bind function from Screen D and while going back From E to D we can easily trigger a function on Screen D.

But in this case, am goingBack from Screen "E" to Screen "B" using screenKey, in this case how to trigger an setState or rerendering ?

For going back am using this ,

 this.props.navigation.goBack("key of screen C, in order to go to B")
  • Did you tried [this](https://stackoverflow.com/questions/52805879/re-render-component-when-navigating-the-stack-with-react-navigation)? – Rohit Aggarwal Jan 12 '21 at 03:26
  • No, i know there is a option like that, but as there are other function which depends on the this ? i don't wanna use this, as it will disturb other states ! – Jenifer_009 Jan 12 '21 at 03:42

0 Answers0