Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 9 months ago

API Countries with React

accessibility, react, vite
Ana Machado Amaral•310
@MachadoA
A solution to the REST Countries API with color theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Hello, guys!

I am particularly proud of my transition from junior to advanced projects. One project, in particular, was highly challenging but immensely rewarding. It pushed me out of my comfort zone and provided substantial opportunities for growth and development. Throughout this project, I honed my skills, tackled complex problems, and delivered a solution that met the high standards of an advanced project. This experience not only deepened my technical expertise but also enhanced my problem-solving abilities and confidence in handling more sophisticated tasks.

Reflecting on the project, one area where I see room for improvement is in the codebase. While the project was a success, I would aim to reimplement it with a focus on minimizing code complexity. Simplifying the code would enhance maintainability, readability, and overall efficiency. By adopting a more streamlined approach, I believe the project could have been even more robust and easier to work with, which would ultimately benefit both the development process and future enhancements.

What challenges did you encounter, and how did you overcome them?

Challenges Encountered and How I Overcame Them:

Layout Challenges with Display Grid and Flex: One of the primary challenges I faced was improving the layout of the project using CSS Grid and Flexbox. Initially, aligning components and creating responsive designs proved to be complex and time-consuming. To overcome this, I took the following steps:

Research and Learning: I dedicated time to study advanced layout techniques and best practices for CSS Grid and Flexbox through online resources, tutorials, and documentation.

Experimentation: I experimented with different layout configurations and properties to understand their effects and find the best solutions for the project’s needs. Refactoring: I iteratively refactored the layout code, applying incremental changes and testing their impact on different screen sizes and devices to ensure a consistent and responsive design.

Integrating and Managing Routes with React Router: Another significant challenge was implementing and managing routing with React Router. Configuring routes and ensuring that the navigation between different components worked seamlessly required a thorough understanding of the routing library.

By addressing these challenges with a combination of research, hands-on experimentation, and iterative improvements, I was able to enhance both the visual presentation and functionality of the project. These experiences not only improved my technical skills but also contributed to the overall success of the project.

What specific areas of your project would you like help with?

Hello everyone!

I'm currently working on a project and would greatly appreciate your feedback and assistance on a few specific areas of the layout, particularly regarding the buttons and the Details section.

Problem: I'm having trouble applying dark mode to the buttons.

Thank you in advance for your help! Your feedback will be invaluable in improving the quality and usability of my project.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Teodor Jenkler•4,040
    @TedJenkler
    Posted 9 months ago

    Hi @MachadoA,

    Nice project! I love this one because there's so much to learn in a single project. Here are a few suggestions to enhance it even further:

    Custom Select Element: Consider learning how to create a custom select dropdown. This would allow you to add animations, like rotating arrows and hover effects, to match the design more closely. It’s a great way to improve both your CSS and JavaScript skills.

    Search Bar Design: Nice job with adding the "X" to the search bar! Just a small tip—consider removing the outline when the search bar is focused. This can help maintain the clean look of your design.

    Translating Border Names: Consider using JavaScript to translate country border codes (e.g., "FRA") into their full names (e.g., "France"). This would improve user experience and is a great challenge for working with data—it’s more complex than it seems

    Search Bar State Management: I noticed that when you search for a country, navigate to its page, and then go back, the search bar still has one country selected. Consider to clear the search when navigating away t.ex implementing a useEffect to reset the search state under certain conditions. This would make the navigation smoother for users.

    Otherwise, great job with the grid layout and overall design! Continue the great work.

    Best, Teodor

    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