OnResume in react native screen of Android

993 Views Asked by At

I have a screen in react native for android.

I wanted to do some operation when particular screen(implemented in react-native) alone resumes as like fragment's onresume() in java/kotlin

How shall i achieve the fragment's onResume() concept in react native screen?

Searched and analysed some question in stack overflow. I see examples for APP state change but not the screen's state changes in react native.

Thanks in advance!

1

There are 1 best solutions below

1
Michael Bahl On

In case you are using react-navigation you might use useFocusEffect -> https://reactnavigation.org/docs/use-focus-effect/