1.1.2 • Published 11 months ago

@reactusehooks/core v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@reactusehooks/core npm

The core of react-use-hooks which contains the most common hooks.

Features

  • 🎣 Hooks: 4+ hooks for common tasks.
  • 📦 Tree-shakable: Only import what you need.
  • 🌐 TypeScript: Written in TypeScript with predictable static types.
  • 📚 Docs: Each hook has a detailed docs.
  • 🐣 Tiny: Less than 1.5kb gzipped.
  • 🎯 Works with Next.js: Use hooks in Next.js without any issues.

Install

npm install @reactusehooks/core

Usage

Every single hook is inferred by TypeScript, so you don't need to specify the type of the hook.

import {useLocalStorage} from '@reactusehooks/core'

const App = () => {
    const [value, setValue] = useLocalStorage('my-key', 'my-value')

    return (
        <div>
            <input value={value} onChange={e => setValue(e.target.value)}/>
        </div>
    )
}

Documentation

Full documentation can be found at https://reactuse-hooks.vercel.app/.

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago