UNPKG

@figliolia/react-hooks

Version:

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

6 lines (5 loc) 156 B
import { useRef } from "react"; export const useController = (Controller) => { const controller = useRef(Controller); return controller.current; };