MCPcopy Create free account
hub / github.com/async-library/react-async / getIdleStatus

Function getIdleStatus

packages/react-async/src/status.ts:17–21  ·  view source on GitHub ↗
(value?: T | Error)

Source from the content-addressed store, hash-verified

15}
16
17export const getIdleStatus = <T>(value?: T | Error) => {
18 if (value instanceof Error) return StatusTypes.rejected
19 if (value !== undefined) return StatusTypes.fulfilled
20 return StatusTypes.initial
21}
22
23export const getStatusProps = (status: StatusTypes) => ({
24 status,

Callers 2

reducerFunction · 0.90
status.spec.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected