Rest Countries Solution using React and TailwindCSS
Design comparison
Solution retrospective
Hi! 👋 This solution was developed with React, Tailwind and React Wouter for pagination. Any feedback is welcome! 😃🚀
Community feedback
- @HusseinSamyPosted 11 months ago
Hello @KevinPadi, 👋🏻
Awesome job on taking the first steps towards your dream!
** Actually, I like your solution more than the design 😆. I have some slight recommendations for you:**
1.Show an error message if the client failed to fetch the data:
const getCountries = () => { useEffect(() => { fetch('https://restcountries.com/v3.1/all?fields=name,flags,tld,currencies,capital,region,subregion,languages,borders,population') .then(response => response.json()) .then(data => { setData(data) }) .catch(error => { ==== In the next line, you can use alert() instead of console.error() to let the user know what happened. console.error('Hubo un error al obtener los datos:', error) }) }, []) }
2.I don't know what the user will see in case the countries didn't come back, but if you handled, great job! ✨
3.Add meta tags:
<meta name="title" content="My Website"> <meta name="description" content="My Website Description"> <meta name="keywords" content="Some, Keywords, Here">
Hope you find it useful!😇
Keep up the fantastic work, and happy coding! 🚀
Marked as helpful1@KevinPadiPosted 11 months agoHey @HusseinSamy ! 👋🏻
Thanks a bunch for checking out my solution and for the awesome feedback! 🚀 I really appreciate your encouragement. Happy coding to you too, mate! 👨💻
0
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