@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>
      )
    }

    Keywords

    none

    Install

    npm i @react-comfy/hooks

    DownloadsWeekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    13.7 kB

    Total Files

    34

    Last publish

    Collaborators

    • avatar