使用来自 redux-saga 的 InteractionManager
Use InteractionManager from redux-saga
在 react-native 应用中,我想使用 InteractionManager from redux-saga。
InteractionManager.runAfterInteractions(() => {
// ...long-running synchronous task...
});
可能吗?如何使用?
InteractionManager.runAfterInteractions()
returns 一个 promise,因此你可以在具有 call
效果的 Saga 中使用它:
yield call(InteractionManager.runAfterInteractions)
在 react-native 应用中,我想使用 InteractionManager from redux-saga。
InteractionManager.runAfterInteractions(() => {
// ...long-running synchronous task...
});
可能吗?如何使用?
InteractionManager.runAfterInteractions()
returns 一个 promise,因此你可以在具有 call
效果的 Saga 中使用它:
yield call(InteractionManager.runAfterInteractions)