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

WorldCountries -- REST Countries API | by MV

react, react-router, tailwind-css, typescript, vite
P
Marcos Valenzuela•710
@Dantalian5
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


Another day, another project. As always, another interesting and fun challenge solved. Tools: React, React-Router, Tailwind, TypeScript. React was, without a doubt, a solid tool for solving this challenge, and it allowed me to delve even further into mastering this tool, the same goes for TypeScript. It was my first time using Tailwind and, honestly, it was a bit confusing at the beginning, but then the work with this framework became increasingly organic and fluid. I tried to optimize the web application as much as possible, in addition to ensuring that navigation was as smooth as possible, but I'm sure it can still be improved, and that there will be errors to correct and pieces of code to refine. As always, I appreciate your feedback and advice in advance.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • elder2701•20
    @elder2701
    Posted over 1 year ago

    Hi. This project is really good; you've done a great job. However, I have some comments for you that may help improve this solution.

    When using TailwindCSS, it's better to create a small design system. This allows you to reuse Tailwind classes and avoid repetition.

    For example. You have next block, which repeats at least 3 times

    <p className="font-semibold text-sm">
    

    Consider creating small components for elements like buttons, inputs, h1...hN, and so on, to facilitate reuse in the future.

    One additional point I'd like to highlight is the quality of the code base. Here are some general recommendations for the final version of the solution: try to eliminate unnecessary parts of the code and comments.

    I hope this helps you. Happy coding!

    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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

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

Log in with GitHub