0.1.15 • Published 1 year ago

@materialios/contexts v0.1.15

Weekly downloads
315
License
ISC
Repository
github
Last release
1 year 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

1 year ago

0.1.13

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.2

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago