Use InteractionManager from redux-saga

Viewed 397

In a react-native app, I want to use InteractionManager from redux-saga.

InteractionManager.runAfterInteractions(() => {
  // ...long-running synchronous task...
});

Is it possible ? How to use it ?

1 Answers

InteractionManager.runAfterInteractions() returns a promise, so you can use it inside a Saga with the call effect:

yield call(InteractionManager.runAfterInteractions)
Related