- Discuss in words something you learned in class today or this week.
Reducers are pure functions are meant to support your state object design.
2. What are “actions” in Redux?
It’s the “outline” of functionality you want your code to conduct. These will consist of an function containing a set of key value parts, usually two, a “type”, the description of your action and a value, also referred to as the “payload”. The payload is the information you will be referring to later on.
3. What is the role of reducers in Redux?
It details how your state will change, this is where your functional code is written relating to the action your previously outlined. These functions will include switch statements referring to various types outlined in the actions. You will need return a new state in most cases. It should be noted as well that you should also create a copy of the previous state, not mutate it.
4. What is the meaning of “single source of truth” in Redux?
It means you are no longer replying on multiple states within each single component, your have a centralized context to depend on.
5. Explain the components of Redux.
Two are explained above, the Action and Reducer.
You also have Store and State. The Store, hold the state of your app, usually the initial state, but this should never be modified.
The State, is the facilitator between the store and reducer, it allows for the two to talk to one also. It is also often where you will apply any middleware you have to apply to your dispatch or other elements effected within your reducer/store.
6. Which (if there is) node library method could you use to solve the algorithm problem you solved last night in your pre-homework.
There wasn’t so much algorithm issues as there is issues that can be addressed by common sense.
7. Which (if there is) node library method could you use to solve the algorithm problem you solved in class tonight?
Material-ui in a way. It allowed us to map the content in a effective manor and locate the items that needed to be deleted.