Skip to content
zenui/react-hooks

useAsync

Run an async function and track its loading, error and data. Only the most recent call updates state, so a slow earlier call never overwrites a newer result.

Level
Intermediate
Since
v1.0.0
import {useAsync} from '@zenuilabs/react-hooks';
Loading demo_

More in Async & Data