Great solution but i notice some major flaws :)
- Search doesn’t work properly - when i search for example ‘ant’ all countries containing ‘ant’ no matter the order comes up usally when making an search bar you will want to check the position too
- React.FC is outdated and you should not use it
- Lack of error handling and datacontext - what i mean by that is you have no contexts where you load data from for example you chould have made an theme context and country context where you load the theme and set the theme and load the countries data from and set it you can use React’s context hook
- Instead of doing the loading of fetched data manually you should use something called react query since i notice you don’t take care of all edge cases, react query will do the work for you and even prioritize the fetch before the site is loaded
Hope all of it helps :)
Marked as helpful
@kamnida1992
Posted
@alex931d Thank you.