Git Product home page Git Product logo

bringing-it-all-together's Introduction

Bringing it all together

The purpose of this application is to make an http request to get information about 3 pokemon and render that information in a reusable component.

Here's what You'll need to do:

Create a text component

  • Create component that renders the following text:

Starter Pokémon are the first Pokémon a Trainer receives. Throug that Pokémon Trainers learn friendship and trust. As such, even advanced Trainers may still use their starter Pokémon, and they will often be the most powerful Pokémon on their respective teams. "

  • Export the component and render it in App.js

In App.js

  • Import the PokemonList component and render it inside the article tag

In PokemonList.js

  • Use React.useEffect to make an 'http request' (it's a mock) when the component renders for the first time
  • Use React.useState to store the data that's returned from the request
  • Use conditional rendering to render the Pokemon components if we have them stored, otherwise render a loading message

Note: you can pass all of the data from the request to the Pokemon component using the spread operator

Note: the response data will take this form: [{...}, {...}, {...}]

In Pokemon.js

  • Add the pokemon's type as a className. (in the data it can be accessed using types[0].type.name
  • Add the pokemon's name to the h2 tag (in the data it can be accessed using name)
  • Add the pokemon's picture as the image src (in the data it can be accessed using sprites.other['official-artwork'].front_default)

At the end the app should look like this:

screenshot

bringing-it-all-together's People

Contributors

dylanatduo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.