Skip to content

Getting started ​

The mobx-web-api source code is written on TypeScript and compiled into NodeNext target.

Requirements ​

Installation ​

bash
npm install mobx-web-api
bash
pnpm add mobx-web-api
bash
yarn add mobx-web-api

Usage ​

ts
import {
  geolocation,
  mediaQuery,
  networkStatus,
  pageVisibility
} from "mobx-web-api";
import { reaction } from "mobx";


pageVisibility.isVisible;


reaction(
  () => networkStatus.isOnline,
  (isOnline) => {
    console.log('isOnline', isOnline);
  }
)

Released under the MIT License.