@jsjoeio/react-use-the-things
v1.0.3
Published
a package that gives you custom React things
Downloads
1
Readme
@jsjoeio/react-use-the-things
a package that gives you custom React things
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