The observable that emits true if the device is disconnected from the network, and emits false if the device if connected to the network.
true
false
import abortWhen from 'react-executor/plugin/abortWhen';import navigatorOffline from 'react-executor/observable/navigatorOffline';const executor = useExecutor('test', heavyTask, [ abortWhen(navigatorOffline)]); Copy
import abortWhen from 'react-executor/plugin/abortWhen';import navigatorOffline from 'react-executor/observable/navigatorOffline';const executor = useExecutor('test', heavyTask, [ abortWhen(navigatorOffline)]);
The observable that emits
true
if the device is disconnected from the network, and emitsfalse
if the device if connected to the network.