Screen Info ​
ts
import { screenInfo } from "mobx-web-api";
Allows tracking device screen
What's inside
Uses Screen API under the hood
Usage ​
ts
import { screenInfo } from "mobx-web-api";
import { reaction } from "mobx";
console.log(screenInfo.availWidth); // 2560
reaction(
() => screen.orientation.type,
(orientationType) => {
console.log(`orientationType: ${orientationType}`);
}
);