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
Drag n drop #6
base: master
Are you sure you want to change the base?
Drag n drop #6
Conversation
src/add_remove_update.js
Outdated
@@ -56,7 +56,8 @@ export class Store { | |||
const checkbox = el; | |||
const taskList = document.querySelector('.tasks'); | |||
const tasks = Store.getTasks(); | |||
const nodes = Array.prototype.slice.call(taskList.children); | |||
const nodes =Array.prototype.slice.call(taskList.children);; | |||
console.log(nodes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly remove the console.log to follow the best practices
@@ -56,7 +56,8 @@ export class Store { | |||
const checkbox = el; | |||
const taskList = document.querySelector('.tasks'); | |||
const tasks = Store.getTasks(); | |||
const nodes = Array.prototype.slice.call(taskList.children); | |||
const nodes =Array.prototype.slice.call(taskList.children);; | |||
console.log(nodes) | |||
for (let i = 0; i < tasks.length; i += 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using (.forEach(), .map(), .filter(), .reduce() and .find()) functions instead of (for loop) for better clean code .
src/add_remove_update.js
Outdated
@@ -56,7 +56,8 @@ export class Store { | |||
const checkbox = el; | |||
const taskList = document.querySelector('.tasks'); | |||
const tasks = Store.getTasks(); | |||
const nodes = Array.prototype.slice.call(taskList.children); | |||
const nodes =Array.prototype.slice.call(taskList.children);; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spread operator can be used to make the code cleaner instead of Array.prototype.slice.call(taskList.children);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ishpaul777 ,
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!
Required Changes ♻️
See the inline comments above
Cheers and Happy coding!👏👏👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ishpaul777 ,
Your project is complete! There is nothing else to say other than... it's time to merge it 👍
Congratulations! 🎆
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Best Practices & drag and drop
I implemented Drag and drop feature in this pull request also in this pull request. My coding Partner @hammaazarok reviewed my code.