After reading redux official docs, i'm unable to get the différence between action creator function and simply action. they are complementary ?
-
1Here's a link: https://stackoverflow.com/questions/38405571/what-are-differences-between-redux-react-redux-redux-thunk – Jun 03 '19 at 11:03
-
It's a duplicate question. https://stackoverflow.com/questions/38405571/what-are-differences-between-redux-react-redux-redux-thunk – Jun 03 '19 at 11:17
-
Possible duplicate of [What are differences between redux, react-redux, redux-thunk?](https://stackoverflow.com/questions/38405571/what-are-differences-between-redux-react-redux-redux-thunk) – Tom Jun 03 '19 at 11:36
3 Answers
Action is message that we send to redux store. It can be of any type like mostly object which contain payload and action type
Action creator is function which create and return function dynamically.

- 594
- 4
- 13
Actions are payloads of information that send data from your application to your store. Actions are plain JavaScript objects. Actions must have a type property.
Action creators are exactly that—functions that create actions.

- 21
- 2
An action in Redux is only a function. That it. It has a type and a potential payload.
Once an action is "dispatched" using redux dispatch method or u can do the easier bindActionCreators which takes care of the dispatch call for you, redux reducers are all fired and then we check for a match in the switch tree of the reducers.
If there is a match in the reducers the new state in the reducer is set and it triggers a render update on react.

- 6,623
- 4
- 36
- 46