• Similar to usePresence, except useIsPresent simply returns whether or not the component is present. There is no safeToRemove function.

    import { useIsPresent } from "framer-motion"

    export const Component = () => {
    const isPresent = useIsPresent()

    useEffect(() => {
    !isPresent && console.log("I've been removed!")
    }, [isPresent])

    return <div />
    }

    Returns boolean

Generated using TypeDoc