REST Countries API / Next.js and Tailwind CSS

Solution retrospective
Hello!
This was my first time using Next.js and also my first time working with React on a proper project - took me quite some time but I've learned a ton doing this one. Doing projects really is the best way to learn.
I initially watched some stuff on Youtube for Next.js but then I quickly jumped straight into it. I also looked at other people's code a lot and I mean a lot but this helped me immensely I think.
First time passing props to components was a huge ohhhh wow for me. Also, dynamic routing and using the <Link>
tag from next/link in Next.js and the way it handles additional pages is very intuitive and easy to use once you get the hang of it.
I have also looked into SSR with getServerSideProps()
and I wanted to implement this because my thinking was that the user should have a fresh site on each request because even though the api data is pretty static and doesn't really change I still wanted to keep it updated with each request (population numbers might change etc.).
I've used Tailwind CSS for the styling, which is a breeze to use and tons of good fun!
Things I would like to improve are:
-
In localhost the theme toggler is working just fine and it switches between light/dark and also stores the current theme in
localStorage
but after deployment to Vercel the switch is not working. Maybe somebody has some insights? -
I would like to implement a proper loading spinner as well.
-
FIXED Another thing would be to display the current selected region in the region filter instead of it saying "Filter by Region" all the time.
-
Another one was to display border countries by their full name instead of the country code.
That was fun!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Alan's solution.
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