README
@solid-primitives/media
Creates a very simple and straightforward media query monitor.
Installation
npm install @solid-primitives/media
# or
yarn add @solid-primitives/media
How to use it
const isSmall = createMediaQuery("(max-width: 767px)");
console.log(isSmall());
Demo
You may view a working example here: https://codesandbox.io/s/solid-media-query-5bf16?file=/src/index.tsx
Changelog
Expand Changelog
0.0.100
Initial release.
1.0.0
Shipped first stable version.
1.1.7
Published with CJS and SSR support.
1.1.10
Added server entry and updated to latest Solid.
1.1.11
Removed onMount and returned the current media query immediately as opposed to onEffect.