Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Recipe-page-main

Manjunath•180
@Manju299
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Tried basic assignment with react library Not sure when break components

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Ehsan Tatasadi•1,800
    @tatasadi
    Posted over 1 year 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 and padding-bottom to the main element or margin-top and margin-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. The alt 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 helpful

Join 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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub