https://github.com/js2me/mobx-web-api
⚡ Reactive browser APIs for MobX! Network, geolocation, media queries - zero config! 🚀
https://github.com/js2me/mobx-web-api
Last synced: 4 months ago
JSON representation
⚡ Reactive browser APIs for MobX! Network, geolocation, media queries - zero config! 🚀
- Host: GitHub
- URL: https://github.com/js2me/mobx-web-api
- Owner: js2me
- License: mit
- Created: 2025-09-17T16:49:53.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2026-02-15T09:58:23.000Z (4 months ago)
- Last Synced: 2026-02-15T15:54:40.878Z (4 months ago)
- Language: TypeScript
- Homepage: https://js2me.github.io/mobx-web-api/
- Size: 2.8 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

# mobx-web-api
[![NPM version][npm-image]][npm-url] [![build status][github-build-actions-image]][github-actions-url] [![npm download][download-image]][download-url] [![bundle size][bundlephobia-image]][bundlephobia-url]
[npm-image]: http://img.shields.io/npm/v/mobx-web-api.svg
[npm-url]: http://npmjs.org/package/mobx-web-api
[github-build-actions-image]: https://github.com/js2me/mobx-web-api/workflows/Builds,%20tests%20&%20co/badge.svg
[github-actions-url]: https://github.com/js2me/mobx-web-api/actions
[download-image]: https://img.shields.io/npm/dm/mobx-web-api.svg
[download-url]: https://npmjs.org/package/mobx-web-api
[bundlephobia-url]: https://bundlephobia.com/result?p=mobx-web-api
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/mobx-web-api
⚡ Reactive browser APIs for MobX! Network, geolocation, media queries - zero config! 🚀
### [Read the docs →](https://js2me.github.io/mobx-web-api/)
```ts
import { mediaQuery, networkStatus } from "mobx-web-api";
reaction(
() => mediaQuery.sizes.client.width,
(clientWidth) => {
console.log(`clientWidth changed to ${clientWidth}px`);
}
)
reaction(
() => networkStatus.isOffline,
(isOffline) => {
if (isOffline) {
console.log('Oh no you are offline :(')
}
}
)
```