MCPcopy
hub / github.com/reduxjs/redux / onClick

Function onClick

test/typescript/injectedDispatch.ts:21–27  ·  test/typescript/injectedDispatch.ts::onClick
()

Source from the content-addressed store, hash-verified

19 const hoc: HOC<{ onClick(): void }> = connect(dispatch => {
20 return {
21 onClick() {
22 dispatch({ type: class="st">'INCREMENT' })
23 class="cm">// @ts-expect-error
24 dispatch(Promise.resolve({ type: class="st">'INCREMENT' }))
25 class="cm">// @ts-expect-error
26 dispatch(class="st">'not-an-action')
27 }
28 }
29 })
30}

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.50

Tested by

no test coverage detected