Country facts app

Solution retrospective
React Router wasn't that easy for me to use. I also think that there are a lot of optimizations and code refactoring needed.
Regarding API calls and nested routes, I'd appreciate it if anyone could let me know about the best practices.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @BryanFonseca
Hi @adeleke5140. Your work looks great! I was browsing your code and noticed you used a regular expression on your component which renders the country info. My approach was to use the internationalization API, it works out of the box and does it according to the browser language, with code like this you get a nicely formatted string:
new Intl.NumberFormat(navigator.language).format(your_big_number)
Also, I see you used one CSS file for all your components, how did it go? In my solution I opted for splitting them using CSS Modules so that I kept my style declarations scoped to only one component per file.Marked as helpful - @IslemMedjahdi
Hello @Kakeru, I love your work, good job. I have just some improvements to say, It would be better if you add pagination becuse your website looks too long and fix the flag images ( width and height) I can't see my full country flag :D check my work: https://country-finder-medjahdi.netlify.app/ Have a nice day!
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