useUrgentUpdate
React 18 transition priority switcher.
177 B
•Updated on September 3, 2026
Installation
Bash
pnpm dlx shadcn@latest add @spaceui/hooks-lifecycle-use-urgent-updateUsage
Code
import { useUrgentUpdate } from '@/hooks/use-urgent-update'
const urgent = useUrgentUpdate()
urgent(() => setCount((c) => c + 1))API Reference
Parameters / Props
None
Return Value
| Return Type | Description |
|---|---|
(fn: () => void) => void | Urgent update wrapper. |