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 create and remove book using redux #2

Merged
merged 8 commits into from Feb 22, 2022

Conversation

Yothu
Copy link
Owner

@Yothu Yothu commented Feb 22, 2022

Description

This pull request is about configuring the Redux Store and creating actions and reducer for adding and removing books.

Project Requirements

  • Configure the Redux Store and import the necessary methods from Redux into the configureStore.js file.
  • Write the book's actions and reducer using the ducks pattern.
  • Set the data inputs in the local React state in the React component responsible for adding new books.
  • Use the redux-logger to check if your application is working correctly.

References

For a more detailed description of the project's instructions check this page.

Usage

To know how to install and use this project check the README.md file!.

@Yothu Yothu added the enhancement New feature or request label Feb 22, 2022
@Yothu Yothu self-assigned this Feb 22, 2022
Copy link

@julie-ify julie-ify left a comment

Choose a reason for hiding this comment

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

Hi @Yothu,

Good job so far!

Highlight!

  • Good feature branch name ✔️
  • No linter errors ✔️
  • Descriptive pull request ✔️
  • Descriptive commit messages ✔️
  • Good code organization and working app ✔️
  • Descriptive README ✔️

Hello ✋, you have done well reaching this point of the milestone 🤝 . But there are some issues that you still need to work on to go to the next project but you are almost there!

Status: Required Changes ♻️⛔️

Check the comments under the review.

Optional suggestions

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread and tag me @julie-ify if something is not 100% clear.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


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.

Comment on lines 26 to 42
const newBook = {
id,
title,
author: 'Robert',
};
dispatch(addBook(newBook));
setTitle('');
};

return (
<FormContainer>
<AddBook>ADD NEW BOOK</AddBook>
<form>
<input type="text" name="name" placeholder="Book title" />
<select>
<option disabled selected>Category</option>
<form onSubmit={submitBookToStore}>
<input type="text" onChange={(e) => setTitle(e.target.value)} value={title} placeholder="Book title" />
<select defaultValue="DEFAULT">
<option value="DEFAULT" disabled>Category</option>
</select>

Choose a reason for hiding this comment

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

  • Good job so far 👍. However, instead of having a default author author: 'Robert' each time a book is created, and a default category option, why don't you add several categories in which users can select any category they like out of the ones you provided or you can remove this category select tag and use normal input tag for the author just like the input for the title where you allow users to add author of the book they added 🤔. Think about this and choose one option and implement it instead of having it as default. 👍

Copy link

@ZeenatLawal ZeenatLawal left a comment

Choose a reason for hiding this comment

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

Hi @Yothu,

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:

Congratulations! 🎉

6vEo

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.


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.

@Yothu Yothu merged commit 69d2b3e into develop Feb 22, 2022
@Yothu Yothu deleted the feature/create-and-remove-book branch February 22, 2022 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants