Skip to content

finish task#2

Open
KJ-MU wants to merge 4 commits into
TheCodePeople:mainfrom
KJ-MU:main
Open

finish task#2
KJ-MU wants to merge 4 commits into
TheCodePeople:mainfrom
KJ-MU:main

Conversation

@KJ-MU

@KJ-MU KJ-MU commented Mar 16, 2024

Copy link
Copy Markdown

No description provided.

return;
}

Edit(updatedTodo);

@AlhassanAli01 AlhassanAli01 Mar 22, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of naming the function Edit, I would suggest naming it onEdit.
That way it would be understood that this is supposed to be an event that should be handled.
This is a convention that you will often see when reading react code.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same goes for handleDelete, since it's supposed to be passed as prop to the component itself naming it onDelete would be more appropriate.

if it were to be handled inside the component itself naming it handleDelete won't be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants