Skip to content

lisswart/5-react-hooks-redux-use-dispatch-lab

 
 

Repository files navigation

Using the useDispatch Hook Lab

Learning Goals

  • Dispatch an action using the useDispatch hook

Overview

In this application we will be building an application to keep track of our favorite restaurants. We will keep our react application separated from our redux store by using the Provider component.

Use the react-redux library to connect the store to our react application. Utilize the Provider component to give your components access to the Redux store. Make sure to also implement useDispatch().

Instructions

Redux is already set up through index.js and the reducer restaurantsReducer. In the RestaurantInput component, use the useDispatch hook along with the addRestaurant action creator to dispatch an action to the store when the form is submitted.

Run this app in the browser to get a sense of how the app should function. Then, write code to get the tests to pass!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.3%
  • HTML 28.7%