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

Function addTodoAsync

test/helpers/actionCreators.ts:17–25  ·  test/helpers/actionCreators.ts::addTodoAsync
(text: string)

Source from the content-addressed store, hash-verified

15}
16
17export function addTodoAsync(text: string) {
18 return (dispatch: Dispatch): Promise<void> =>
19 new Promise(resolve =>
20 setImmediate(() => {
21 dispatch(addTodo(text))
22 resolve()
23 })
24 )
25}
26
27export function addTodoIfEmpty(text: string) {
28 return (dispatch: Dispatch, getState: () => any) => {

Callers 1

Calls 3

resolveFunction · 0.85
addTodoFunction · 0.70
dispatchFunction · 0.50

Tested by

no test coverage detected