0.0.3 • Published 9 months ago

use-fun-hooks v0.0.3

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

use-fun-hooks

npm build publish codecov Type Coverage Libraries.io dependency status for latest release bundlejs npm

Functional useCallbacks

Getting started

$ npm i use-fun-hooks

Overview

import { pipe } from 'pipe-ts'
import { useCallback } from 'react'

export function usePipe(...fns) {
  return useCallback(pipe(...fns), fns)
}

export function usePartial(fn, ...heads) {
  return useCallback((...tails) => fn(...heads, ...tails), [fn, ...heads])
}

Usage

See test

0.0.3

9 months ago

0.0.2

11 months ago

0.0.1

11 months ago