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

Method setData

packages/react-async/src/Async.tsx:262–266  ·  view source on GitHub ↗
(data: T, callback?: () => void)

Source from the content-addressed store, hash-verified

260 }
261
262 setData(data: T, callback?: () => void) {
263 this.mounted &&
264 this.dispatch({ type: ActionTypes.fulfill, payload: data, meta: this.getMeta() }, callback)
265 return data
266 }
267
268 setError(error: Error, callback?: () => void) {
269 this.mounted &&

Callers 1

onResolveMethod · 0.95

Calls 1

getMetaMethod · 0.95

Tested by

no test coverage detected