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

responsive project created with react, react-router v6, and js

Stalin 410

@StalinAM

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

Solution retrospective


I made this project using React, I have some doubts about the use of useContext, if someone can tell me if I can improve something in the context.

Any comments that help me to improve will be welcome.

Community feedback

Damjan 220

@iDamjan

Posted

Overall it looks fine to me. I would suggest though minor things, which are mostly preference.

Don't leave console log in a code and actually do something with the error, maybe set some boolean state and display error message on the screen. One thing i would do also to add a general loader everywhere, which will be handled by the loadData() function in a finnaly block after the catch so: catch(e) {setError(true)} finally {setLoading(false}.

I would also add better naming, because i think most of the things are not very clear. and maybe styled components in a separate folder outside everything, which i think its a prefered way of using styled components.

Let me know if this makes sense. Overall i really like the project, my version when i was doing this was a total trash :)))

Marked as helpful

0

Stalin 410

@StalinAM

Posted

@iDamjan thank you for your comments, can you give me some examples of good names to describe better, thank you

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