shadcn-ahooks

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.

Documentation and Examples

Installation

Open in
pnpm dlx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.json
npx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.json
yarn shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.json
bun shadcn@latest add https://shadcn-ahooks.vercel.app/r/useUpdate.json

A hook that returns a function which can be used to force the component to re-render.

Examples

Default Usage

API

const update = useUpdate();

On this page