Design comparison
Solution retrospective
Tried basic assignment with react library Not sure when break components
Community feedback
- @tatasadiPosted 10 months ago
Hey there,
Good job on completing this challenge using React! It's great to see you applying your skills in building a web application. Here are some suggestions to improve your project:
Understanding Component Creation in React: React is all about components and reusability. A good rule of thumb is to create a component when you notice you are repeating the same pattern or when a part of your UI is sufficiently complex and can be isolated. For example, if you have repeated UI elements like a card or a button, these can be separate components. In your case, it's good that you have a
Home
component. If you find yourself adding more pages or complex elements, consider breaking them down into smaller components. This approach enhances readability and maintainability.Padding for Main Element or Margin for Container: To enhance the visual appeal and readability, add
padding-top
andpadding-bottom
to themain
element ormargin-top
andmargin-bottom
to the.container
class on desktop view. This creates some space around your content, preventing it from touching the edges of the viewport.Alt Attribute for Images: Accessibility is a key aspect of web development. Always include an
alt
attribute in your<img>
tags. This is not just good for SEO, but it's crucial for users who rely on screen readers. Thealt
text should describe the image content or its purpose on the page.<img src={Omelette} alt="Simple Omelette" />
Remove Commented Code: If certain styles or elements are commented out and not being used, like your commented table styles, it's a good practice to remove them before finalizing your project. This cleans up your code and makes it easier to read and maintain.
As for creating components in React, the
Home
component is a good start. In a larger application, you might create components for reusable UI elements such as buttons, input fields, or sections like a recipe card. The key is to identify parts of your UI that are self-contained or reused multiple times.Keep up the good work, and continue refining your skills with each project!
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord