Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Ecommerce Rest countries challenge React | Tailwind

#react#tailwind-css#vite#axios

@prajwal-tomar

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


The search functionality is not working properly. Any help would be appreciated.

Community feedback

Carl 815

@CarlHumm

Posted

Hello Prajwal

I've only had a quick look and noticed some minor issues that you could fix.

  • You have a typo in your regions list. The region is known as Americas and not America.
  • Your form works on submission. As such, if a user selects a region from the select list it will not update the results unless they focus the input field and press enter. A temporary quick fix to demonstrate would be to add an onChange event listener to your select list that points towards the onSubmit handler and compare the difference.

I haven't used Outlet myself but I assume it's similar to context api in that you create a context for child components to consume. I found it odd that you have both filteredData and responseData and not a single shared state/context. It also appears you've passed down responseData to dashboard but not used it - this could be my misunderstanding though so feel free to correct me

Good luck implementing changes, and all the best on your next project

0

@prajwal-tomar

Posted

@CarlHumm hey, thanks for the feedback. Yes, thanks for pointing out the search functionality issue. I'll fix it.

and, Outlet is not used for state management. It is a concept of React router dom. I didn't use any state management library in the above solution. Just simple passing as props.

thank you!

1

Please log in to post a comment

Log in with GitHub
Discord logo

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