Code Monkey home page Code Monkey logo

codealong-12-21-2022's Introduction

FLW2 02.3 Code It Solo

MusicPedia is an app where people can find information about different famous musicians. This information is stored in the object titled artistData at the top of the App.js file.

Let's use what we learned about React to complete the app.

When it's done, it should look like this.

  1. First, let's make sure our ArtistCard component is linked correctly. Use import/export in the appropriate places to make this happen.

  2. In ArtistCard.js, our component is looking a little sad - all we have is an empty div. Nest an h2 tag to hold the name of the artist. Check that you use the prop name correctly.

  3. We have some the name of our artist, but we have more data to use! In App.js, add an image prop and a famousSongs prop to the ArtistCard instance.

  4. In ArtistCard.js, nest an img tag and assign the src to the appropriate prop name. Include an alt property in the tag and equal it to the string "artist".

  5. Continue by adding a p tag to display the famous songs.

This looks better, but we still have more artists to display!

  1. In App.js, add 2 more instances of the ArtistCard component (there should be 3 total).

  2. Be sure to display the data of the next artist (hint: array indexes)

Success! All three artist cards should be displaying now :)

Finish early?:

  • Try to combine your knowledge of React AND the map() method to complete this exercise

codealong-12-21-2022's People

Contributors

tundra96662 avatar

Watchers

 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.