A really small library to make working with matchMedia
a little easier.
Using npm:
npm i --save mq-match-maker
const foo = (matches) => {
console.log(matches ? 'foo' : 'bar' )
}
matchMaker.register('(min-width: 600px)', foo)
matchMaker.deregister('(min-width: 600px)', foo)
const foo = (matches) => {
console.log(matches ? 'foo' : 'bar' )
}
matchMaker.register('(min-width: 600px)', foo, false)