Using State

Learn how to use state in Redux-thunk.

We'll cover the following...

Another feature we gain by using redux-thunk is access to the state when processing the action. This allows us to dispatch or suppress actions according to the current application state. For example, we can prevent actions from trying to add recipes with duplicate titles:

const addRecipe = (title)
...