Skip to content

EmergingDigitalAcademy/react-workshop-famous-people

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Famous People List

Start with the code provided here.

The server side code and routes have been provided for you. You shouldn't have to change anything in the server. No database needed, the server serves it all out from memory.

npm install

npm run server

npm run client

Try a GET to https://localhost:5000/people/ to see. POST works too with a body like {name: 'person', role: 'their role'} and Content-Type application/json

Required Features

  • In the FamousSection Component, there is a GET request and it fires off on load of the component. Take the response.data and assign it to the famousPeopleArray.
  • Add a bullet list of everyone in the famousPeopleArray array to the bottom of the FamousSection Component.
  • When the Submit button is clicked, add the new famous person to the database with a POST request.
  • Once a successful POST request has been made, the list on the DOM should update to show that new person.
  • Clear the input fields after a new person is added.

Stretch Goals

Components (REQUIRES PROPS)

Split the FamousSection Component into 3 Components:

  • a FamousPersonForm (to add a new person)
  • a FamousPersonList (to display each person in the database)
  • a FamousPerson (to display a single famous person's info as 'Felicia Day is famous for "The Guild". (Use this inside of the FamousPersonList component.)
  • a delete button (you'll need to create a route for this too)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published