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. 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 inside of our switch
statement, so that the variables we make while responding to an action don't leak into the outer scope.
A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.