1.0.8 • Published 4 years ago

@jdthornton/screenwidth v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@jdthornton/screenwidth

npm (scoped) npm bundle size (minified)

React screen width context and hooks.

Install

$ npm install @jdthornton/screenwidth

Usage

import ScreenWidthProvider, { withIsMobile } from "@jdthornton/screenwidth";

const HelloWorld = withIsMobile(({
  isMobile
}) => (
  <div>
    Hello {isMobile ? "Mobile" : "Desktop"} World!
  </div>
), 1024)

function App(){
  return(
    <ScreenWidthProvider>
      <HelloWorld />
    </ScreenWidthProvider>
  )
}
1.0.8

4 years ago

1.0.2

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago