- they contain a type and a payload.
Type:
is basically a name for the action. Ex:TYPE: INCREMENT
Payload
is state- we use these in Redux to pass as arguments to dispatchers we say dispatch an action
- they hold the state of the application in something called a store,
- reducers contain the logic behind the action and actually do the thing to alter the state.
- normally these are like switch statments that decide what will happen to state when a given action is called
- they take two arguments 1. previous state 2. the action type
- returns an object containing the updated state
- they receive the state data and display it on the DOM
- usually these are organized into two types 1. containers 2. components
- containers are smart they contain some logic
- components are usually dumb and can be stateless functional components, which just render something from a parent container
- stores interact with reducer functions to keep the state updated.
- stores contain the state date