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

Countries API Project

#sass/scss
Gaspare Tortora• 130

@Gaspavar92

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


Any feedback concerning refactoring, best practices or better approaches is welcome, thank you!

Community feedback

Gillian Akpeki• 445

@akpekig

Posted

Refactoring feedback:

  • When the data initially loads from the API, styles are no longer applied. You have to click the dark/light mode button for styles to come back. This is worth investigating.

  • DRY (Don't Repeat Yourself) is a principle that would help with the styles. It's great you've got a light and dark mode implemented, but both files repeat a lot of code. Seeing as Sass is modular anyway, why not make a third file with all the repeated code that acts as a common module that's never removed?

  • SOLID principles would help out with the JS part. IMO, there's a lot of getting and setting that doesn't feel as modular as they should be.

Marked as helpful

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