Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 282 Bytes

onLine$.md

File metadata and controls

14 lines (10 loc) · 282 Bytes

onLine$

ReadonlyBehaviorSubject which tracks the latest value of window.onLine property, boolean. Is stubbed to also work on sever.

import { onLine$ } from 'rx-use/lib/onLine$';

onLine$.getValue(); // true

onLine$.subscribe((onLine) => {
  // true / false
});