Skip to content

Instantly share code, notes, and snippets.

@udittyagi
Last active October 15, 2019 16:12
Show Gist options
  • Save udittyagi/f8c730b81c05a967e1a4f74c000af891 to your computer and use it in GitHub Desktop.
Save udittyagi/f8c730b81c05a967e1a4f74c000af891 to your computer and use it in GitHub Desktop.
import React from 'react'
import {useBreakpoint} from './breakpoint.js'
const Usage = () => {
const breakpoints = useBreakpoint();
const matchingList = Object.keys(breakpoints).map(media => (
<li key={media}>{media} ---- {breakpoints[media] ? 'Yes' : 'No'}</li>
))
return (
<ol>
{matchingList}
</ol>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment