This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@billogram/use-toggle
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

@billogram/use-toggle

A React hook for toggle components

Install

yarn add @billogram/use-toggle

Usage

import useToggle from '@billogram/use-toggle';

See types for exported types.

useToggle

const {
    close,
    open,
    toggle,
    value,
} = useToggle({
    disabled: false,
    initialValue: false,
    onOff: noop,
    onOn: noop,
    shouldRunHandlerOnInitialRender: false,
});

Note

This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.

License

MIT

/@billogram/use-toggle/

    Package Sidebar

    Install

    npm i @billogram/use-toggle

    Weekly Downloads

    5

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    21.6 kB

    Total Files

    16

    Last publish

    Collaborators

    • andreagylling
    • ewakosciukiewicz
    • irynaziruikina
    • jamesbillo
    • jmfederico
    • miriamlarsson
    • oscarekholm