Open nhuthm-setel opened 1 year ago
Hello @nhuthm-setel, great start!
Final result: ✅ passed 80% of the requirements
We also have some comments for your work:
Should use button
element for the close button
https://github.com/nhuthm-setel/df-frontend-2023/blob/main/assignment-1/index.html#L76-L79
Should place the search element inside a <form />
component so that we can have the native form operations such as enter to submit,...
https://github.com/nhuthm-setel/df-frontend-2023/blob/main/assignment-1/index.html#L23
It'd be better to keep one naming convention for both naming ids and classes https://github.com/nhuthm-setel/df-frontend-2023/blob/main/assignment-1/style.css#L131-L135
If the search value is present, it may be worthwhile to incorporate the new addd item into the filtered list. Currently, it makes the whole list appear again after adding a new book.
The JSON parse should be inside try-catch
and it's safer to validate the data before passing to the function call
https://github.com/nhuthm-setel/df-frontend-2023/blob/main/assignment-1/script.js#L44
It is recommended to render the user interface from data as opposed to relying on directly reading data from the DOM, since using a single rendering method instead of two promotes consistency and clarity https://github.com/nhuthm-setel/df-frontend-2023/blob/main/assignment-1/script.js#L104-L122