useUpdateEffect

useUpdateEffect is a custom hook that skips side effects on the initial render, and only runs them when the dependency array changes.

state changed by useEffect: 1

state changed by useUpdateEffect: 1

Usage

import { useUpdateEffect } from "@yamada-ui/react"
useUpdateEffect(() => {}, [])