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

Method onReject

packages/react-async/src/Async.tsx:252–260  ·  view source on GitHub ↗
(counter: Number)

Source from the content-addressed store, hash-verified

250 }
251
252 onReject(counter: Number) {
253 return (error: Error) => {
254 if (this.counter === counter) {
255 const onReject = this.props.onReject || defaultOptions.onReject
256 this.setError(error, () => onReject && onReject(error))
257 }
258 return error
259 }
260 }
261
262 setData(data: T, callback?: () => void) {
263 this.mounted &&

Callers 2

loadMethod · 0.95
runMethod · 0.95

Calls 1

setErrorMethod · 0.95

Tested by

no test coverage detected