Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

rest country API

Amr khaled 270

@amrkhaled222

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

Community feedback

Maxence 170

@MaeWolff

Posted

Hi! Congrats on your challenge :)

I noticed a few things you could improve:

  • In app/country/[countryName]/page.js, you wrote porps instead of props.
  • You could separate your data logic from the rest of your app by creating hooks to fetch your data, e.g. useCountries would fetch all countries.
  • You can use Tanstack Query (documentation) for your state management with your data fetching.
  • Use a solution like prettier if you're on vscode to make your code a bit more readable

Next step is to start using TypeScript :)

Marked as helpful

0

Amr khaled 270

@amrkhaled222

Posted

Thnx for your feedback it's very helpful ❤️@MaeWolff

0

Please log in to post a comment

Log in with GitHub
Discord logo

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