npm.io
1.0.3 • Published 7 years ago

@jsjoeio/react-use-the-things

Licence
MIT
Version
1.0.3
Deps
0
Size
8 kB
Vulns
0
Weekly
0

@jsjoeio/react-use-the-things

a package that gives you custom React things

NPM JavaScript Style Guide

Install

npm install --save @jsjoeio/react-use-the-things

Usage

import React from 'react'

import { TwilioLogo, useCounter, useDocumentTitle } from '@jsjoeio/react-use-the-things'

const App = () => {
  const [count, setCount] = useCounter(4)
  useDocumentTitle(count)
  return (
    <div>
      <TwilioLogo
        height='240px'
        width='520px'
        customStyles={{ border: '1px solid black' }}
    />
    <p>Currently, the count is: {count}</p>
    <button onClick={() => setCount(count + 1)}>Add 1</button>
    <button onClick={() => setCount(count - 1)}>Subtract 1</button>
    </div>
  )
}

License

MIT jsjoeio