0.1.15 • Published 3 years ago

@materialios/contexts v0.1.15

Weekly downloads
315
License
ISC
Repository
github
Last release
3 years ago

@materialios/contexts

ReactJs contexts for @materialios

Features

  • ResponsiveContext, { ResponsiveContextProvider }
  • DrawerContext, { DrawerContextProvider }

Installation

npm i @materialios/contexts

Example

import { useContext } from 'react'
import { ResponsiveContext, ResponsiveContextProvider } from '@materialios/contexts'

const Home = () => {
  const { orientation, device, size } = useContext(ResponsiveContext)

  return (
    <div className='Home'>
      <p>orientation: {orientation}</p>
      <p>device: {device}</p>
      <p>size: {size}</p>
    </div>
  )
}

const App = () => {
  return (
    <div className='App'>
      <ResponsiveContextProvider>
        <Home />
      </ResponsiveContextProvider>
    </div>
  )
}

export default App

Contributing

It's really still early days. So, help us to grow faster. Email me on muhammadnurrendra@gmail.com

Creator

@mnrendra

0.1.15

3 years ago

0.1.13

4 years ago

0.1.10

4 years ago

0.1.11

4 years ago

0.1.12

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.5

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago