MCPcopy Create free account
hub / github.com/byte-fe/react-model / consumerAction

Function consumerAction

src/helper.ts:23–39  ·  view source on GitHub ↗
(
  action: Action,
  modelContext: { modelName: string }
)

Source from the content-addressed store, hash-verified

21}
22
23const consumerAction = (
24 action: Action,
25 modelContext: { modelName: string }
26) => async (params: any, middlewareConfig?: any) => {
27 const context: InnerContext = {
28 Global,
29 action,
30 actionName: action.name,
31 consumerActions,
32 middlewareConfig,
33 modelName: modelContext.modelName,
34 newState: null,
35 params,
36 type: 'o'
37 }
38 return await applyMiddlewares(actionMiddlewares, context)
39}
40
41const consumerActions = (
42 actions: Actions,

Callers 1

consumerActionsFunction · 0.85

Calls 1

applyMiddlewaresFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…