Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on decomposing the application! You've successfully split the components and their styles into separate, well-organized folders, meeting all the core requirements of the task. Your solution is approved.
For future reference, it's a good practice to maintain a consistent export style. In components like Article.jsx, Header.jsx, Navigation.jsx, and Welcome.jsx, you've used both named and default exports. While this works, you can simply declare the component as a constant (e.g., const Article = () => ...) and use the default export at the end of the file. This approach avoids redundancy and improves code consistency.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| import React from 'react'; | ||
|
|
||
| // Create an Article function returning the HTML of article block | ||
| export const Article = () => ( |
There was a problem hiding this comment.
It's good practice to stick to one export type per module for components. Since the task requires a default export, you can remove the named export here and just define a constant: const Article = () => (...). The export default on line 63 will then handle the exporting. This will also help resolve linter warnings in App.jsx.
| import './Navigation.css'; | ||
| import React from 'react'; | ||
|
|
||
| export const Navigation = () => ( |
There was a problem hiding this comment.
It's a good practice to stick to a single export style for components within a project. Since the task requires a default export, you can remove the named export from this line and simply declare it as const Navigation = () => (...). The export default Navigation; on line 18 already handles the exporting correctly. This will make your components more consistent.
| import Navigation from '../Navigation/Navigation'; | ||
|
|
||
| // Create a Header function returning the HTML of header block | ||
| export const Header = () => ( |
There was a problem hiding this comment.
It's a good practice to use a single export type for a component in a file. Since the task requires a default export, you can remove the named export from this line and just declare a constant: const Header = () => .... The existing export default Header; on line 13 is sufficient and meets the requirement.
| import React from 'react'; | ||
|
|
||
| // Create a Welcome function returning the HTML of welcome block | ||
| export const Welcome = () => ( |
There was a problem hiding this comment.
While this works, it's a good practice to stick to a single export style per component module. Since the task requires using export default, the named export here is redundant. You can change this to const Welcome = () => ( and rely on the export default Welcome; on line 10. This will make your component exports consistent across the project.
No description provided.