Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

Responsive All Countries Made with React + Vite

accessibility, react, sass/scss, vite, react-router
Kamasah-Dickson•5,570
@Kamasah-Dickson
A solution to the REST Countries API with color theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello guys this is my second React app that I completed.... I think I should really focus on Async Js and focus more on refactoring and file structuring. One of the challenges I faced was that when I was using react-router....I wanted to use the <Outlet/> to maintain the header component but It wasn't working I got tired and I manually imported and rendered the header component in the /:countryID page and my theme and toggle all got broken 😂😂 because I cant send props. it wasn't a component that could receive props it was just a react-router element={} page which am not rendering anywhere u understand? so I copied the header and pasted it in the /:countryID page 😂 but It worked..how would you have fixed it ??.....Guys what do you think about this project. Kindly share your opinions please.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Kamasah-Dickson's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License