Skip to content

Toro-TMS/employees-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample App Exercise

The Prompt

Using React, build a UI that:

  1. Fetches a list of "employees" from the provided /api/employees endpoint.
  2. Renders the list of employees, with each employee displayed in a summarized form.
  3. Allows a user to expand each employee to show the additional details about each employee.
  4. Allows a user to expand the entire list of employees at once using something like an "Expand All" button.
  5. Allows a user to delete an employee from the system.
  6. BONUS: Implement some kind of updating functionality for one or more fields on the employee.

A few helpful tips:

  • Don't focus on styling. We're more interested in seeing how you write your component(s) and handle things like managing React state and making HTTP requests.
  • You're encouraged to write unit tests.

Getting Started

  1. Fork the employees-sample-app repository.
  2. In the project directory, run yarn install to download the app's dependencies.
  3. Run yarn start to run the app in development mode. It will be viewable at http://localhost:3000 in your browser. The page will hot reload as you make changes to your application code.
  4. We are using Mirage JS to provide a mock backend for the application. You can check out the mock backend server implementation in src/server.js. Feel free to extend or modify the endpoints provided if they do not suit your needs. Currently, the server implements three endpoints:
    1. GET /api/employees - This endpoint returns a list of all the employees.
    2. PATCH /api/employees/:id - This endpoint allows updating of a single employee record.
    3. DELETE /api/employees/:id - This endpoint allows deleting a single employee record.
  5. You can run tests with yarn test.
  6. When you are done, push your commits to your forked repository and send us a link to the repository (make sure the repository is public).

Miscellaneous Information

This project was bootstrapped with Create React App. If you run into any issues with running the app, you can check out the Create React App documentation for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published