freeCodeCamp/curriculum/challenges/arabic/03-front-end-libraries/redux/define-an-action-creator.ar...

936 B

id title challengeType isRequired videoUrl localeTitle
5a24c314108439a4d403614e Define an Action Creator 6 false

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof actionCreator === "function", "The function <code>actionCreator</code> should exist.");'
  - text: ''
    testString: 'assert(typeof action === "object", "Running the <code>actionCreator</code> function should return the action object.");'
  - text: ''
    testString: 'assert(action.type === "LOGIN", "The returned action should have a key property type with value <code>LOGIN</code>.");'

Challenge Seed

const action = {
  type: 'LOGIN'
}
// Define an action creator here:

Solution

// solution required