Skip to content

Instantly share code, notes, and snippets.

@tsapeta
Last active December 31, 2018 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsapeta/4ce5ac63de0f41f7aae526c181a65592 to your computer and use it in GitHub Desktop.
Save tsapeta/4ce5ac63de0f41f7aae526c181a65592 to your computer and use it in GitHub Desktop.
Expo TaskManager example
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