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

Function onClick

test/typescript/injectedDispatch.ts:21–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…