@react-comfy/hooks
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@react-comfy/hooks

Handy hooks.

Installation

yarn add @react-comfy/hooks
# or
npm i @react-comfy/hooks

Usage

Import hooks and use them in your components.

@react-comfy/hooks is transpiled to ES2015. If you're targeting ES5, use @react-comfy/hooks/esm/es5 (ESModule) or @react-comfy/hooks/cjs/es5 (CommonJS) instead.

// Example usage of useId
import * as React from 'react'
import { useId } from '@react-comfy/hooks'

export const MyComponent: React.FC = () => {
  const labelId = useId('my_component_label__')

  return (
    <div>
      <span id={labelId}>Description for input</span>
      <input aria-labelledby={labelId} />
    </div>
  )
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @react-comfy/hooks

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

13.7 kB

Total Files

34

Last publish

Collaborators

  • pocka