Monday, 11 January, 2021 UTC


Summary

So far our reducers have simply been used to update a single value passed in with an action. In this lesson we'll practice adding more logic into a reducer, which is recommended in the [redux style guide](https://redux.js.org/style-guide/style-guide#put-as-much-logic-as-possible-in-reducers). We will do this by removing a hard coded list of supported currencies to update based on the API call that we make. One of the techniques we'll cover is using curly braces (`{` and `}`) to create [blocks](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block) inside of our `switch` statement, so that the variables we make while responding to an action don't leak into the outer scope.