@En-Jen
Posted
Hey Aaron, really well done!!๐ I went ahead and bookmarked it so I can study it more and learn from it. I really like the country card loaders that are displayed during the initial API call and the sound effect on toggle between light and dark mode is a really nice touch ๐
One suggestion I have is maybe have more of the country card loaders during the initial API call so that there aren't any big blank spaces on the screen without loaders if the user is viewing it on a wider desktop.
Also, it looks like you're doing quite a bit of prop drilling with the prop handleSearch (it's passed to FilterableCountryList, then FilterControls, then SearchBar before it's actually used) Could you declare that function in the SearchBar component so that it lives in the component that actually uses it? You could use Redux to manage the state and access countryFilter
in App.jsx and then dispatch the action to change the state from SearchBar.jsx. I realize learning Redux may seem daunting but it's worth it!
Overall super awesome job and keep up the great work!! ๐ช
@astroud
Posted
@En-Jen Thanks for the feedback Jen and for the new term. I find myself "prop drilling" too often and it's annoying. I'm going to read up on the topic + Redux so I can avoid drilling when appropriate.
Thats a good point on adding more loaders. I suppose it'd be difficult to have too many.
What type of equipment are you sitting behind in your profile pic? I have a construction grade TLB Kubota myself (no where that big though) and I find "tractor therapy" quite useful after a long day of coding.
@En-Jen
Posted
@astroud Yeah, it can be hard to avoid prop drilling as a project gets more complex if you're not using Context or a state management library. I was also running into that issue a lot too before my last project where I finally learned how to implement Redux.
Actually in my picture I'm sitting behind the wheel of an old, nonfunctional school bus that was in a beer garden as a seating area somewhere in Tasmania, Australia haha. Pretty random but I kind of liked the picture ๐