Peer-to-Peer review
Closed this issue · 0 comments
Hi @kelvinbush,
Great work on this project 💯. You respected the requirements and you have professional documentation.
Here are some improvements that your team has suggested:
-
We noticed that your code for checking the value of the input is not working, users can still submit empty values. Kindly fix this bug by checking if the input value is empty or not.
To-Do-List/src/modules/add-update-delete.js
Lines 4 to 6 in 3ad0307
-
We noticed that you call
saveToDos
andrenderToDos
twice, for example in removeToDo you call the methods inside the function, and then you call them again insiderearrangeToDos
. To make your code DRY and faster, please consider calling these 2 methods only insiderearrangeToDos
.
To-Do-List/src/modules/to-do-list.js
Lines 47 to 53 in 3ad0307
-
We also noticed that when you restore data from
localStorage
, you have a function that loops through the array to create objects and pushes them into another array. The array that you get fromlocalStorage
is already formatted in that way so you don't need to do it again inside that function. Kindly refactor your code to make it simpler and DRY.
To-Do-List/src/modules/to-do-list.js
Lines 16 to 21 in 3ad0307
-
In the tests, we saw that you're creating new to-dos in each test separately. To make your code DRY and faster, please consider creating the to-dos at the top of the file (outside the tests) so all tests can use the created to-dos and so you don't have to create many todos for each test.
To-Do-List/edit-update.test.js
Lines 14 to 22 in 3ad0307