Define an Action Creator

Define an Action Creator
0.0 0

#1

Tell us what’s happening:

Your code so far


const action = {
  type: 'LOGIN'
}
// Define an action creator here:
actionCreator() {
    return action;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/redux/define-an-action-creator


#2

Ah, React can expose you to that kind of error :stuck_out_tongue:
You’re not into a class anymore, so you should define your function as a function^^ I mean, literally :wink: