JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q54829F
  • License MIT

Batch of useful UI-related React hooks

Package Exports

  • @brix-ui/hooks/use-aria-props
  • @brix-ui/hooks/use-breakpoint-props
  • @brix-ui/hooks/use-delay
  • @brix-ui/hooks/use-disclose
  • @brix-ui/hooks/use-event-props
  • @brix-ui/hooks/use-input-value
  • @brix-ui/hooks/use-key-press-handle
  • @brix-ui/hooks/use-media-query
  • @brix-ui/hooks/use-single-selection
  • @brix-ui/hooks/use-unmount-on-exit
  • @brix-ui/hooks/use-update-effect
  • @brix-ui/hooks/use-updated-state

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@brix-ui/hooks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@brix-ui/hooks

Batch of useful UI-related React hooks.


Installation

npm i @brix-ui/hooks # react react-dom
yarn add @brix-ui/hooks # react react-dom

Make sure to have react and react-dom installed in your package as they are included in our peer dependencies.

Usage

Every hook functions is exported by default and should be used inside React components with respect to the rules of hooks.

import useMediaQuery from '@brix-ui/hooks/use-media-query';

const Component = () => {
  const isMd = useMediaQuery('screen and (min-width: 768px)');

  // ...
};