Design comparison
Solution retrospective
React router was the way to go. I also used a custom hook from useContext to make a context provider so that I only had to load the country array once and then could access it from any component. I would appreciate anyone taking a look at the code and letting me know what I could have done better. I think the React code is pretty good, but the css is mediocre.
Community feedback
- @cmcrawford2Posted 12 months ago
I just realized that the back button or the browser back loses the filter and just shows all the countries again. Also, going back from a country selected by a border country button just goes back to the home page. I have to add some router code to fix this.
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