UNPKG

framer-motion

Version:

An open source and production-ready motion library for React on the web

6 lines (4 loc) • 143 B
import { useEffect } from "react" export function useUnmountEffect(callback: () => void) { return useEffect(() => () => callback(), []) }