
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 about 1 year 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 about 1 year 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