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

Where in the World using React

@jasminekim

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

Community feedback

P
Matt Studdert 13,611

@mattstuddert

Posted

Great work on this Jasmine! How long have you been working with React for? The app looks great and functions well! 🙂

One small tip I'd suggest is that you could make use of object destructuring within your code to help remove repetition of this.props. Your CountryDetail.js file is an example of where this could cut down your code.

Before using props within the render method you can destructure the properties off of the props object like this:

render() {
  const { location: { borders, name, flag, population, etc etc } } = this.props;
}

The instead of writing <h1>{this.props.location.name}</h1> you would instead write <h1>{name}</h1>. Here's an MDN article for more info.

Keep up the great work!

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