Standard return shape for data-fetching hooks.
const { data, loading, error }: HookResult<SoundCloudTrack> = useTrack(123); Copy
const { data, loading, error }: HookResult<SoundCloudTrack> = useTrack(123);
The type of data returned on success.
Fetched data, or null while loading or on error.
null
The error thrown during fetch, or null on success.
true while the request is in flight.
true
Standard return shape for data-fetching hooks.
Example
See