Note: This document is a work in progress. You can help improve it.

React-ified Octocats

Your Octodex is amazing. It has revolutionized the Github Octodex experience and more people are viewing Octocats on their mobile devices than ever.

However, the code is repetitive and isn't yet setup to work with an API.

Your task now is to refactor the static Octodex into a static (non-API) version in React.

You'll identify the main Components on the page and create React components for each, breaking down those Components into smaller ones as needed.


  • Learn to identify parts of a web site as Components
  • Use app-app (GAMMA stack) to build a React project
  • Understand and use React components

Stretch Objectives

  • Understand and use "props" in React
  • Use to render a collection of components in React

Explorer Mode

  • Reuse your Octodex as a starting point for this assignment. Or use an existing well factored (HTML and CSS) Octodex.
  • Figure out the main components of the page. These will be the main components in your <App> component.
  • You should have at least two components...
  • Create your React app
  • Copy the CSS from your Octodex into index.css
  • Clear out the implementation in the render method of App and have it render your main components.
  • Create those components and paste the appropriate HTML from your Octodex into the render method of those components.
  • Break down those components and use this.props to dynamically customize the components that need it.

Adventure Mode

  • Place the definition of each Octocat in an array and use map to generate the Octocat components

Epic Mode

  • Put the array of Octocats in a octocats.json file and import that into your app.
  • OR
  • Use the fetch api to retrieve the list of Octocats from this api instead

Additional Resources