How to run Background Tasks with React Native

Manorama Perera
1 min readOct 12, 2018

React Native let the developers to create mobile apps with rich mobile UI declarative components.

When we are building React Native apps, there can be some requirements for the app to run some background tasks. Couple of these are;

* Downloading content

* Uploading content to some server

* Data/media processing

These are time consuming tasks, which need to run continuously regardless of the app status being foreground or background.

In such situation, React Native Queue helps us achieve the background tasks by allowing us to create tasks and keeping them in a persistent queue until the tasks are completed.

React Native Background Task Library is another helpful package for the developers as it let us create tasks that needs to run repetitively in time intervals.

Here is a good article explaining how to utilize these two libraries in order to achieve background task running with your React Native app.

https://hackernoon.com/easy-os-background-tasks-in-react-native-bc4476c48b8a

--

--