Design comparison
Solution retrospective
This was my first project ever using React. I struggled a bit, and I know it is not perfect, but I am happy I managed to do it, since I learnt quite a bit. If anyone has any recommendation as far as best practices in React go, please do tell.
Community feedback
- @rafaelmaiachPosted almost 5 years ago
Hey Diana, great solution. Using React was a great choice.
About some feedback:
First, I would check on the report problems about accessibility and try to fix them.
It has some time since I used React for the last time (I'm more into Vue now), but I can give you some feedback.
About styled components, I would declare them below the main component render. I prefer to open the code and see my component first instead of a list of styles.
When I checked the component Countries-list.js, it looks you could have splitted the Loading component in a separeted file. Also, even inside the renderData function, for example, the CountryCard, maybe you could have a separated component that receives the dataList and this component takes care about the logic to render the country card.
On country details, I saw some CountryDetails repeated, maybe it's a good option for a separated component too.
Well, as a more advanced feedback, for your future studies, you could check about Redux to centralize your app state and your services functions (api calls)
Keep the hard work and congratulations again
2
Please log in to post a comment
Log in with GitHubJoin 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