1.0.8 • Published 2 years ago

@jdthornton/screenwidth v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.2

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago