freeCodeCamp/guide/english/certifications/front-end-libraries/redux/define-an-action-creator/index.md

29 lines
402 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Define an Action Creator
---
## Define an Action Creator
### Hint 1
A function is defined using the following syntax:
````javascript
functionName(){
console.log("Do something");
}
````
Where console.log can be changed as per the need.
### Hint 2
A value is returned using the ```` return ```` keyword
### Solution
````javascript
function actionCreator(){
return action;
}
````