Open nguyennhathuy opened 1 year ago
Hello @nguyennhathuy , well done!
Final result: ✅ passed
We also have some comments for your work:
The App
component has a lot of logic. It's a good idea to break it down into multiple components for better organization.
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.
Avoid creating a large component like the BodyContent
component. Instead, let its child components be imported directly into the App component.
Your class naming convention seems a bit messy. You might want to explore the BEM technique for better organization of class names.
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.
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.
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.
https://assignment-2-livid.vercel.app/