Getting Started
Welcome to @utiliser/react-hooks.
Prequesites
- React ^18.*
- Node.js version 16.14 or above:
- TypeScript
Installation
Choose your favorite package manager either npm or yarn.
with npm:
npm install @utiliser/react-hooks
with yarn:
yarn add @utiliser/react-hooks
Quick Example
To use a hook, you will need to import it.
import { useOnline } from '@utiliser/react-hooks'
const App = () => {
const { isOnline } = useOnline()
return <div>{isOnline ? <p>Online</p> : <p>Offline</p>}</div>
}
export default App
✨ Inspired By
🥷 Written
📃 License
MIT License © 2022-PRESENT Virak Khun