Last active
December 31, 2018 11:51
-
-
Save tsapeta/4ce5ac63de0f41f7aae526c181a65592 to your computer and use it in GitHub Desktop.
Expo TaskManager example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TaskManager } from 'expo'; | |
const taskName = 'task-name-of-your-choice'; | |
TaskManager.defineTask(taskName, ({ data, error }) => { | |
// the contents of the `data` parameter depends on the task type | |
console.log(`Task ${taskName} has been called with params:`, data, error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment