A cached resource.
- Source
Example
{
data: { name: 'John Doe' },
status: 'idle',
error: null,
mutate: (newData: User) => void,
invalidate: () => void,
}Members
data :Signal.<(T|undefined)>
The data for the cached resource.
Type:
- Signal.<(T|undefined)>
- Source
error :Signal.<unknown>
The error for the cached resource.
Type:
- Signal.<unknown>
- Source
invalidate :function
The function to invalidate the cached resource.
Type:
- function
- Source
mutate :function
The function to mutate the cached resource.
Type:
- function
- Source
status :Signal.<('idle'|'loading'|'revalidating'|'error'|'success')>
The status of the cached resource.
Type:
- Signal.<('idle'|'loading'|'revalidating'|'error'|'success')>
- Source