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

add dispatch and useSelector to use Redux in Components #3

Merged
merged 1 commit into from Aug 31, 2022

Conversation

tiagomarin
Copy link
Owner

In this pull request I added the necessary methods of React Redux to use the Redux store in the components.

Also I added the funcionality for removing and adding books to the list by dispatching actions and using the state connected to Redux store. All books have a unique ID, for that I used the npm package uuid.

Lastly I added the funcionality for the button "status" on the categories page to display a message "under construction" below the button.

Please note

I created the reducers and actions using 2 diferent approaches, one with normal Redux and the other using the createSlice from the toolkit library. I plan to make both work to practice both, but at the end I'll choose 1 of them to leave in the project.

Copy link

@Nemwel-Boniface Nemwel-Boniface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @tiagomarin 👋 ,

I am Nemwel your reviewer for this PR 🧔‍♂️

Thank you for meeting all the project requirements good job! 🥳
Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🥳 🎉

Highlights

Great job setting up the correct linters ✔️
Professional documentation ✔️
Correct workflow ✔️
Meaningful commit messages ✔️
Met all the milestone requirements ✔️

[Optional] suggestions

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me @Nemwel-Boniface in your question so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

import Book from '../components/Book';
import AddBook from '../components/AddBook';
import AddBookForm from '../components/AddBookForm';
// import { removeBook } from '../Redux/book/book';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • [ OPTIONAL] Kindly remove all commented-out and unwanted/ unused pieces of code from your code base. It makes it look messy and cluttered.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that, I forgot to remove!

author={book.author}
title={book.title}
category={book.category}
// removeClickHandler={removeClickHandler}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • [ OPTIONAL] Kindly remove all commented-out and unwanted/ unused pieces of code from your code base. It makes it look messy and cluttered.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that, I forgot to remove!

@tiagomarin tiagomarin merged commit 953e139 into development Aug 31, 2022
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

2 participants