SmoggeR_js
SmoggeR_js

Reputation: 3150

How to call a function when the App is resumed after been closed or minimized in React-Native

I need to check network things of my Application when the app is resumed after been closed or minimized (It's means when the app starts or is resumed after been minimized) and I don't know how to do it. I just want to call a function when this happens. No matter what view would be. Undependent of the view, I need to call that function (It a simple fetch to check the session). I hope you understand my poor english, thanks for all. Greetings!

Upvotes: 0

Views: 908

Answers (1)

Thành Trang
Thành Trang

Reputation: 631

You can check your app's state by using AppState API. react-native already support this feature.

FYI: https://facebook.github.io/react-native/docs/appstate.html

Upvotes: 1

Related Questions