caasi / use-cont

A parody custom React Hook.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useCont

One hook to rule them all,
one hook to find them,
One hook to bring them all
and in the darkness transform them.

This is a parady custom React hook.

Usage

import { useCont } from '@caasi/use-cont'

function App() {
  const sayHello = useCallback(
    (f: (x: string) => void) => { setTimeout(f, 5000, ':D') },
    []
  )
  const [hello, error] = useCont(sayHello, '')

  return (
    // your app here
  )
}

About

A parody custom React Hook.

License:MIT License


Languages

Language:TypeScript 100.0%