Skip to content

solution#4341

Open
leemonch1k-space wants to merge 1 commit intomate-academy:masterfrom
leemonch1k-space:develop
Open

solution#4341
leemonch1k-space wants to merge 1 commit intomate-academy:masterfrom
leemonch1k-space:develop

Conversation

@leemonch1k-space
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@vakt159 vakt159 left a comment

Choose a reason for hiding this comment

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

Good job

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

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

  1. Rate AI review example

import React from 'react';

// Create an Article function returning the HTML of article block
export const Article = () => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 = () => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 = () => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 = () => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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.

3 participants