Conversation
Dominik-Dudek-code
commented
Jan 22, 2025
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Your code is well-structured and meets most of the task requirements! 🎉 While there are a few minor improvements suggested, such as avoiding inline event handlers and considering type specifications for props, these do not impact the core functionality. Keep up the great work and consider these suggestions for future enhancements! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
| {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */} | ||
| <button data-cy="ClearButton" type="button" className="delete ml-3" /> | ||
| </h1> | ||
| export class App extends React.Component<{}, State> { |
There was a problem hiding this comment.
Consider specifying the type of the props in the React.Component generic type. Currently, it's using an empty object {} which is fine if there are no props, but it's good practice to explicitly define it for clarity and future maintenance.
|
|
||
| return ( | ||
| <main className="section container"> | ||
| {selectedGood.length !== 0 ? ( |
There was a problem hiding this comment.
Using selectedGood.length !== 0 is correct, but you might want to consider using selectedGood directly in the conditional check, as it is a string and will evaluate to false when empty. This is a minor readability improvement.