Skip to content
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

Update TodoItems.js #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ajinsunny
Copy link

Binding in Constructor: You are binding your class methods in the constructor, which is a common practice in class components. However, it might be more convenient and cleaner to use arrow functions for methods in your class. This way, you don't need to bind this context in the constructor.

Prop Types: It's a good practice to define propTypes for your components. This helps with validation and makes sure that the props you're expecting are being passed in correctly.

Destructuring Props: In the render method, you can destructure the props for cleaner code.

Use const instead of var: In modern JavaScript, const or let is preferred over var due to their block scope.

Semantic HTML: Use button for delete action as it is more semantic, and it can help with accessibility.

Binding in Constructor: You are binding your class methods in the constructor, which is a common practice in class components. However, it might be more convenient and cleaner to use arrow functions for methods in your class. This way, you don't need to bind this context in the constructor.

Prop Types: It's a good practice to define propTypes for your components. This helps with validation and makes sure that the props you're expecting are being passed in correctly.

Destructuring Props: In the render method, you can destructure the props for cleaner code.

Use const instead of var: In modern JavaScript, const or let is preferred over var due to their block scope.

Semantic HTML: Use button for delete action as it is more semantic, and it can help with accessibility.
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.

None yet

1 participant