We are performing a screen transition with react-native react-navigation.
How do I refresh my screen when I return with ←?
The screen configurations are List and Detail.
"When the ""List"" screen is displayed, the ""Trigger from outside of a certain app"" will transition to the ""Details"" screen."
I'd like to update the list when I get back from there.
I wonder if any event will happen in the list when I return.
StackNavigator's onNavigationStateChange can also capture screen transitions, but
It might be nice to get an instance of "list" there, but
How can I get it?
The focus
event is available.
The focus
event fires when the focus returns to the stacked "list" screen.
There are three ways to do it.
Detailed code samples are provided in the official document.
https://reactnavigation.org/docs/function-after-focusing-screen/
© 2024 OneMinuteCode. All rights reserved.