Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 2.04 KB

LAB.md

File metadata and controls

72 lines (57 loc) · 2.04 KB

Search All The Things

Use webpack and react to create a tested app that allows a user to search an API.

Choose an API

Possible API choices:

Part of this assignment is to research the API you are going to use. Don't assume these all are going to work!. Requirements:

  • supports CORS (search from AJAX call)
  • searchable (ideally on more than one thing)
  • paged

App Requirements

  1. Prompt the user on initial load to enter criteria
    • aka not searched is different than nothing found
  2. Allow the user to search on one or more criteria
    • Bonus! for criteria condition that comes from the API!
  3. Call the API and display a loading indicator
  4. Present the search results and clear the loading indicator
  5. Account for "page size". Does not have to be user settable, but it can!
  6. Display
    • Search Term(s) used
    • Total count of results
    • "page of pages"
  7. Show Paging Controls
    • Previous and Next
    • Disable when not possible
    • Bonus! Results per page selectable
    • Bonus! Render specific page numbers around current range

Process Requirements

  1. Sketch out UI and decompose into components
  2. Transfer to tree diagram and map out state, props and event

Testing Requirements

Test components:

  • Trigger events
  • Use snapshot testing
    • Include each state if component has multiple representations

Development Requirements

  1. Standard project setup (config, package.json, etc.)
  2. Include .travis.yml
  3. Organize
    • components into separate files
    • css by component
  4. Components
    • Lift state
    • Data down, events up
  5. Services
    • Encapsulate the API calls into a module in the src/services folder
  6. Keep code clean

Rubric

  • Follow component architecture guidelines 2pts
  • Functionality and Usability to Requirements 4pts
  • Idiomatic React 2pts
  • Clean code and project organization 2pts