Class-38 Readings: Redux - Asynchronous Actions


Class-38 Readings: Redux - Asynchronous Actions

Table of Contents

Reading, Research, and Discussion

1. How granular should your reducers be?

  • Simple purpose and simple makes sure that your reducers are handling one thing and easy to test.

2. Pro or Con – multiple reducers can “fire” when a commonly named action is dispatched

  • Pro is you can combine your reducers and fire out simliar or async actions so we can change two or 3 or more things at the same time if need be.

3. Name a strategy for preventing the above

  • a way to prevent this would be use additional namesace to clear action names that would not overlap or duplicate names.

Vocabulary Terms

  • store:
    • def: A store holds the whole state tree of your application. The only way to change the state inside it is to dispatch an action on it. A store is not a class. It’s just an object with a few methods on it.
  • combined reducers:
    • def: This ability is to take two reducers of similar values and combine into one reducer function.

Additional Resources

Bookmark / Skim