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

Method run

packages/react-async/src/Async.tsx:222–232  ·  view source on GitHub ↗
(...args: any[])

Source from the content-addressed store, hash-verified

220 }
221
222 run(...args: any[]) {
223 const deferFn = this.props.deferFn || defaultOptions.deferFn
224 if (deferFn) {
225 this.args = args
226 const props = { ...defaultOptions, ...this.props }
227 return this.start(() => deferFn(args, props, this.abortController)).then(
228 this.onResolve(this.counter),
229 this.onReject(this.counter)
230 )
231 }
232 }
233
234 cancel() {
235 const onCancel = this.props.onCancel || defaultOptions.onCancel

Callers 1

constructorMethod · 0.95

Calls 4

startMethod · 0.95
onResolveMethod · 0.95
onRejectMethod · 0.95
deferFnFunction · 0.70

Tested by

no test coverage detected