Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 801 Bytes

Redux Notes.md

File metadata and controls

18 lines (15 loc) · 801 Bytes

Throughout src/js/. is documentation explaining redux and the purpose of each file.

What are the 3 principles of redux?

  1. The state of your whole appliction is located within the store
  2. The only way to change a state is by sending a signal to the store
  3. The state is immutable and cannot change in place (read-only)

What is the three main redux methods?

  1. getState: For accessing the current state of the application
  2. dispatch: for dispatching an action
  3. subscribe: for listening on state changes

Test your knowledge? (answers are documented throughout the code)

  1. What is the purpose of the store?
  2. What is a reducer? What 2 parameters does it take?
  3. What is an action?
  4. Why do we use declare the type feild in an action as constant?
  5. If a reducer gets too big; what can we do?