The observable that emits true when the window receives focus, and emits false when the window looses focus.
true
false
import retryWhen from 'react-executor/plugin/retryWhen';import windowFocused from 'react-executor/observable/windowFocused';const executor = useExecutor('test', heavyTask, [ retryWhen(windowFocused)]); Copy
import retryWhen from 'react-executor/plugin/retryWhen';import windowFocused from 'react-executor/observable/windowFocused';const executor = useExecutor('test', heavyTask, [ retryWhen(windowFocused)]);
The observable that emits
true
when the window receives focus, and emitsfalse
when the window looses focus.