Skip to content

Instantly share code, notes, and snippets.

@cbmackintosh
Last active March 23, 2021 22:21
Show Gist options
  • Save cbmackintosh/42495c93747afe55418dc8aa0b9850b1 to your computer and use it in GitHub Desktop.
Save cbmackintosh/42495c93747afe55418dc8aa0b9850b1 to your computer and use it in GitHub Desktop.

ROTTEN TOMATILLOS: INITIAL PLAN

Jessica and Cameron

What components do you envision needing?

  • App class component
  • MovieContainer functional component (container for movie posters on home view)
  • MoviePoster component functional?
  • MovieDetails component functional?
  • Search bar (class component) - extension if time allows

Also, possibly:

  • Rating component?
  • Revenue/Budget comparison component?

Where will data be stored?

  • Initially, movie data will be imported from a hard-coded file - later we'll transition to fetching using a network request
  • Dummy or API data will be used to initialize the App component - all movie data stored in state of App component
  • State will also be needed if we integrate a search bar

How will information be passed around?

  • App will hold all movie data in state, either from the hard-coded files for dummy data or data fetched from the API server
  • On page load, App will instantiate a new MovieContainer component, passing in the movie data from state
  • MovieContainer will then iterate through that array of Movie data, using each element to instantiate a new MoviePoster component
  • MovieDetails will need to accept props to display that specific movie's detailed information.

When a user clicks on a MoviePoster component, how will React identify and display the correct info for MovieDetails? Will MoviePoster need to be a class component for this?

Screen Shot 2021-03-23 at 4 21 13 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment