Responsive landing page using ReactJS and Styled-Components

Solution retrospective
I can't get the region filter to work properly, can someone help me find the solution?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @b-a-merritt
Hey!
The filter feature is a little tricky. The reason why yours is having issues is because it's not rendering the results after selection. You need a useEffect() hook that induces a re-render with your query state in the dependency array.
Also, I think it would be better if you saved the country data into a variable, then filtered the results into another variable that you then passed to your Components, instead of fetching the data with each new query.
Anyway, good job and happy coding!
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