You're given a project that displays the following:
This page is displayed using just HTML, written in the public/index.html
file. Your job is to recreate this page using JSX in the src/App.js
file.
- Fork the repository
- Clone it.
cd
into the project directory.- Install the required packages for the task.
$ yarn install
5. Run the project
$ yarn start
6. After you make any changes, you don't need to do anything. The page will refresh automagically!
- Run the project, see what it looks like.
- The
index.html
file has adiv
tag withid="app"
. Your task is to copy all of the content within thatdiv
into theApp
's component function inApp.js
. - Convert it to valid JSX.
- You'll know when you're done if the page looks exactly the same as it did in step one and you have no errors or warnings in your console.
You may have noticed that there's a file called data.js
in your src/
directory. This file exports an array called authors
. Each element in that array contains the data for a single author.
- Inspect the
authors
array insrc/data.js
, and familiarize yourself with its contents. - Import this array into your
App.js
file:import authors from './data'
. - Currently, all the authors in
App.js
are being hardcoded. Replace the hardcoded text with values from theauthors
array.
- Push your code to Github