UNPKG

@figliolia/react-hooks

Version:

A small collection of simple React Hooks you're probably rewriting on a regular basis

7 lines (5 loc) 159 B
import { useRef } from "react"; export const useController = <T>(Controller: T) => { const controller = useRef(Controller); return controller.current; };