Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

REST API Countries

axios, react, sass/scss, react-router
Saswat Samal•80
@saswat10
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


problems

  • naming classes in css
  • dividing the react components into smaller chunks, like which would make the code more reusable

unsure areas

  • displaying the currencies and native names in international format

questions

  • how can I make use of useMemo and useCallback for making fetch reqeusts?
  • what are the best practices for optimizing the search component (it is in the CountryList.jsx file)?
  • how to break down components and make code DRY?

GENERAL QUESTION How do you start your project - like do you first start writing the logic and add design or do you study the design first and make classes and then add logic?

Any other suggestions are open, please free to answer, It would help me a lot

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Saswat Samal's solution.

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