Skip to content

gabischool/Sprint-Project-Star-Wars-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sprint Project: Star Wars API

This Project allows you to practice the concepts and techniques learned over the past Sprint and apply them in a concrete project. This Sprint explored ReactJS, Function Components, component state, side effects and React Router. In your Project for this Sprint, you will demonstrate proficiency by creating an application that uses ReactJS to consume live data retrieved from the World Wide Web and style that data nicely on the page.

Instructions

Read these instructions carefully. Understand exactly what is expected before starting this Sprint Project.

This is an individual assessment. All work must be your own. Your Project score is a measure of your ability to work independently using the material covered through this sprint. You need to demonstrate proficiency in the concepts and objectives introduced and practiced in preceding days.

You are not allowed to collaborate during the Sprint Project. However, you are encouraged to follow the twenty-minute rule and seek support from your instructor in your cohort help channel on Slack. Your work reflects your proficiency ReactJS Fundamentals and your command of the concepts and techniques in the Function Components and Class Components.

You have 2 days to complete this Project. Plan your time accordingly.

Commits

Commit your code regularly and meaningfully. This helps both you (in case you ever need to return to old code for any number of reasons and your project manager.

Description

In this Project, create a web page that presents a styled list of Star Wars characters. Being able to render out data to a web page is a large part of what JavaScript developers do, this Project assesses your ability to achieve such a task.

Self-Study/Essay Questions

Demonstrate your understanding of this Sprint's concepts by answering the following free-form questions. Edit this document to include your answers after each question. Make sure to leave a blank line above and below your answer so it is clear and easy to read by your project manager.

  • What is React JS and what problems does it try and solve? Support your answer with concepts introduced in class and from your personal research on the web.

  • What does it mean to think in react?

  • Describe state.

  • Describe props.

  • What are side effects, and how do you sync effects in a React component to state or prop changes?

Project Set Up

Follow these steps to set up and work on your project:

  • Create a forked copy of this project.
  • Add Instructor as collaborator on Github.
  • Clone your OWN version of Repo. (Not Gabi's by mistake!)
  • Create a new Branch locally: git checkout -b <firstName-lastName>.
  • Change directories into ./starwars (cd starwars) and run yarn install or npm install to retrieve all needed dependencies.
  • Once you have installed the node_modules, run yarn start or npm start to get your server up and running.
  • With the server up and running, open Chrome and head over to localhost:3000 and view your beautiful app. Maybe it's not that pretty... yet, your goal is to ensure this project becomes a thing of beauty. Follow these steps for completing your project.
  • Implement the project on this Branch, committing progress & changes often.
  • Push commits: git push origin <firstName-lastName>.

Follow these steps for completing your project:

  • Submit a Pull-Request to merge Branch into master (student's Repo).
  • Add your instructor as a Reviewer on the Pull-request.
  • PM then will count the HW as done by merging the branch back into main.

Minimum Viable Product

The MVP of this project will be broken up between 2 stages. Follow each step and be sure to use your RESTful Api and Routing skills to make this application work perfect.

Stage 1

  • Fetch a list of Star Wars characters from the Star Wars API (or SWAPI) and render them to the screen.
  • Follow the documentation to learn how to fetch a list of "people". However, don't spend too long on this. Here is a link for you to follow if you've looked around the docs for about 15 minutes or so and haven't found where to go - Secret Link to Awesomeness 🤫.
  • Set the data you fetch to state.
  • Map over the list and render a component for each character on the page.
  • Do the same thing for Star Wars films.
  • You must have at least one element for each star wars character or film in the data set.
  • The elements must be styled with either Reactstrap or MaterialUI - don't rely on browser default styles.

Stage 2

Add a Router to this application by using React Router.

  • Install React Router Dom using this command npm install react-router-dom.
  • You'll start by wrapping your root component in the Router component.
  • Declare your routes with Route.
  • Declare your routes with Route.
  • Then make it so you can navigate to your routes using Link.
  • Create three routes in your App component, one at '/' for your Home component,and one at /films for your Star War movies and /people for Star War characters.
  • Then in your App component, create a nav bar that will use Link to route to your different pages.

Required best practices:

  • Consistent naming. Examples: variables, functions, Components, and file/folder organization.
  • Consistent spacing. Examples: line breaks, around arguments and before/after functions.
  • Consistent quotation usage.
  • Spell-check.
  • Schedule time to review, refine and reassess your work.

It is better to submit a Project that meets MVP than one that attempts too much and fails.

Stretch Problems

  • Add new route which allows you to view more information about a film or/and a character

  • Build a pagination system that will allow you to load the next page of data.

    • console.log() the data coming back from the server.
    • Notice that there are next and previous fields that give you a URL.
    • You can build a function that will get characters called getCharacters that you can use dynamically to get the next or previous set of characters. You would need to supply it with the proper fields, and you'll need to set up more state to do this.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published