0.10.6 • Published 8 months ago

@frfla/react-hooks v0.10.6

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

@frfla/react-hooks

React Utility Custom Hook Package

npm install @frfla/react-hooks
yarn add @frfla/react-hooks
pnpm add @frfla/react-hooks

useBooleanState

  • A useState hook for using boolean state conveniently
  • example const [display, show, hide, toggle] = useBooleanState(initialState)
  • If initialState is not provided as an argument, the default state value is set to false.
  • DOCS

useConditionalRender

  • A React hook for using conditional render easily
  • useful in triggering animation with (un)mounting component
  • DOCS

useDebouncedEffect/useDebouncedState

  • A React hook for debounced effect/state
  • DOCS

useForceRender

  • A React hook for forcibly rendering a component
  • DOCS

useIsomorphicLayoutEffect

  • In an SSR environment, useEffect should be used, while on the client side, useLayoutEffect should be utilized.
  • helps prevent hydration errors
  • DOCS

useModal

  • A React hook for using Modal easily
  • DOCS

Number Hooks

  • React hooks for using numbers easily
  • DOCS

useTextCopy

  • A React hook for copying plain text to clipboard
  • other types will be provided later
  • example: const [ copy, isCopied, restoreState ] = useTextCopy(duration, onError)
  • works only in localhost or https
  • DOCS

useForm (beta)

  • A React hook for using form easily
  • During the beta period, the API may unexpectedly change or new features may be added
  • supports textarea and input (type text, number, checkbox)
  • provides APIs, createUseFormContext and useFormContext for integrating with Context API
  • DOCS
0.10.6

8 months ago

0.10.5

8 months ago

0.10.4

8 months ago

0.10.3

8 months ago

0.10.2

9 months ago

0.10.0

9 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago