29 lines
402 B
Markdown
29 lines
402 B
Markdown
|
---
|
||
|
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;
|
||
|
}
|
||
|
````
|