nguyennhathuy / nhat-huy-df-frontend-2023

https://nhat-huy-df-frontend-2023.vercel.app
0 stars 0 forks source link

Submission for assignment 2. #2

Open nguyennhathuy opened 1 year ago

nguyennhathuy commented 1 year ago

https://assignment-2-livid.vercel.app/

trankhacvy commented 1 year ago

Hello @nguyennhathuy , well done!

Requirements

Final result: ✅ passed

Feedback

We also have some comments for your work:

  1. The App component has a lot of logic. It's a good idea to break it down into multiple components for better organization.

  2. Instead of storing all states in the App component and passing them down to child components, consider creating a context to hold shared states. Child components can then use useContext to access these states easily.

  3. Avoid creating a large component like the BodyContent component. Instead, let its child components be imported directly into the App component.

  4. Your class naming convention seems a bit messy. You might want to explore the BEM technique for better organization of class names.

  5. In your FormModal, it would be better to use different states for each book field. Having all fields in one state can make the code harder to read and maintain.

  6. Consider declaring the number of items per page (in your code, it's 5) in a constant file. This way, you can use this number throughout the app without repeating it in every page.

  7. When a new book is added, it currently appears on the last page, requiring users to navigate there to see it. This isn't an ideal user experience. Please consider moving newly added books to the first page for better visibility. Additionally, it would be helpful to have an empty state displayed when there are no books present.