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

Method setError

packages/react-async/src/Async.tsx:268–275  ·  view source on GitHub ↗
(error: Error, callback?: () => void)

Source from the content-addressed store, hash-verified

266 }
267
268 setError(error: Error, callback?: () => void) {
269 this.mounted &&
270 this.dispatch(
271 { type: ActionTypes.reject, payload: error, error: true, meta: this.getMeta() },
272 callback
273 )
274 return error
275 }
276
277 render() {
278 const { children, suspense } = this.props

Callers 1

onRejectMethod · 0.95

Calls 1

getMetaMethod · 0.95

Tested by

no test coverage detected