MCPcopy
hub / github.com/alibaba/hooks / setState

Method setState

packages/hooks/src/useRequest/src/Fetch.ts:31–37  ·  view source on GitHub ↗
(s: Partial<FetchState<TData, TParams>> = {})

Source from the content-addressed store, hash-verified

29 }
30
31 setState(s: Partial<FetchState<TData, TParams>> = {}) {
32 this.state = {
33 ...this.state,
34 ...s,
35 };
36 this.subscribe();
37 }
38
39 runPluginHandler(event: keyof PluginReturn<TData, TParams>, ...rest: any[]) {
40 // @ts-ignore

Callers 15

runAsyncMethod · 0.95
cancelMethod · 0.95
mutateMethod · 0.95
browser.spec.tsxFile · 0.80
router.spec.tsxFile · 0.80
index.spec.tsFile · 0.80
index.spec.tsFile · 0.80
index.spec.tsxFile · 0.80
useCachePluginFunction · 0.80
useLoadingDelayPluginFunction · 0.80
index.spec.tsFile · 0.80
index.spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected