I Want to call API in the background when App killed and set the data in AsyncStorage. I used the following library but not working for me.
react-native-bac
You would need to implement the componentWillUnmount method on the root of your app or use a library like realm to save the state throughout the use of your app.
componentWillUnmount
Maybe worth checking out this answer