Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 298 Bytes

windowSize$.md

File metadata and controls

12 lines (9 loc) · 298 Bytes

windowSize$

ReadonlyBehaviorSubject that tracks the latest state of browser's window dimensions. Is stubbed to also work on sever.

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

windowSize$.subscribe(({ width, height }) => {
  console.log(width, height); // 1024, 768
});