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

Function Async

packages/react-async-devtools/src/index.spec.js:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import "../../../jest.setup"
7
8const Async = props => {
9 const { data, error, isPending } = useAsync(props)
10 if (isPending) return "loading"
11 if (error) return error
12 if (data) return data
13 return null
14}
15
16afterEach(cleanup)
17

Callers

nothing calls this directly

Calls 1

useAsyncFunction · 0.90

Tested by

no test coverage detected