Quiz 4

Test your knowledge of Action creators.

Q

The following code shows an action creator function. Is the implementation correct?

const createAction = (actionType) => (data) => ({
  type: actionType,
  payload: data
})

const setTime = createAction('SET_TIME')

console.log(setTime(100))
A)

Yes

B)

No

Get hands-on with 1200+ tech skills courses.