Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use redux in react components #3

Closed
wants to merge 1 commit into from

Conversation

divinecharlotte
Copy link
Owner

@divinecharlotte divinecharlotte commented Jul 12, 2022

IN THIS BRANCH I IMPLEMENTED THE FOLLOWING:

  • I changed the default state in my books reducer from an empty array to an array with a few books.
  • I imported Redux Provider and my store into the main component of my React app.
  • I connected my app to the Redux store.
    -I made my list of books displayed from the Redux store and I used useSelector to consume the state.
  • My component responsible for adding new books, I added functionality for the "Add new" button click:
    -I imported Redux useDispatch.
    -Set the data inputs in the local React state (set title and author )
    -In my React component responsible for removing books, I added functionality for the "Remove" button click:
  • In my component responsible for categories, I added functionality for the "Check status" button click:

@divinecharlotte divinecharlotte deleted the react-in-redux-components branch July 13, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant