useUpdate
A hook that returns a function which can be used to force the component to re-render.
Overview
A hook that returns a function which can be used to force the component to re-render.
Installation
Open inpnpm dlx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.jsonnpx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.jsonyarn shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.jsonbun shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.jsonA hook that returns a function which can be used to force the component to re-render.
Examples
Default Usage
API
const update = useUpdate();