Assignment 8

Development Environment

For this assignment, it is up to you if you’d like to use CodeSandbox or set up a React application locally using Create React App.


Build a reusable component of your choice. Take a look at web applications that you use and see what user interface elements might make for a good reusable component. If you can’t think of a reusable component to build, here are some ideas:

  • An accordion
  • A tooltip
  • A Delete button that shows an inline Confirm Delete button when clicked. You could also enhance this so that users must type in a specific string before Confirm Delete becomes enabled. For example, try deleting a repo on GitHub.
  • Tabs with panels
  • A sortable table
  • A checkbox list
  • A file tree

You must implement the following requirements for your reusable component:

  1. Your component must have at least 1 prop that is called on some user interaction (like onClick).
  2. Your component must provide some flexibility as to what HTML is rendered through at least 1 render prop.
  3. Your component must use PropTypes for all component props.

In the App component, show a few examples of your component in action and include a description for each. For example, if you have a prop that allows you to customize the color, show 2 examples of your component where a different color value was passed into the prop.


Create your GitHub repository here:

If you used CodeSandbox, paste your link on a file in the root of your repository and push up that file. You are done!

If you used Create React App, deploy your React project to Surge. Paste your Surge link on a file in the root of your repostiory. Push up all of your code to your GitHub repository. You are done!