In this repository you will find our Peak Activity "Todo List Challenge". This is a application developed in React that hasn't been completed, and we would like you to finish it. All the dependencies you will need to finish this application are already installed. The application uses the create-react-app boilerplate.
- You must use Redux and Redux Thunk (or Redux Saga).
Below are the tasks that need to be completed in order to finish this application.
- Make an HTTP Request to the
Todo List
microservice to retrieve a saved list of items. - If the HTTP Request is successful, the list of items should be stored as an array in Redux State.
- If the HTTP Request was not successful, an error should be rendered on-screen.
- Make an HTTP Request to the
Todo List
microservice to add this item to the database. - Without waiting for the HTTP Request Response, add the item to the array stored in Redux State.
- If the HTTP Request was not successful, an error should be rendered on-screen, and the item should be removed from the array in Redux State.
- Make an HTTP Request to the
Todo List
microservice to edit the item in the database. - Without waiting for the HTTP Request Response, reflect the changes in the array stored in Redux State.
- If the HTTP Request was not successful, an error should be rendered on-screen, and the edit should be reverted in the array in Redux State.
- Make an HTTP Request to the
Todo List
microservice to delete the item passed to this action. - Without waiting for the HTTP Request Response, delete the item from the array in Redux State.
- If the HTTP Request was not successful, an error should be rendered on-screen, and the deleted item should be re-added to Redux State.
- The List component needs to loop through an array of items and create a new row in the table for each item.
- The array of items should be passed in as a prop.
- The
Edit
andDelete
buttons need to be hooked up to their appropriate actions.
- Wire-up this component to Redux and return the array of items stored in State as a prop.
- Pass the array of as a prop to the
List
component. - Wire-up the
Input
to hold it's value in State. - Wire-up the
Add
button to it's appropriate action.
We would like Unit Tests to be written for each of the main components in the application. Below are the locations of where tests need to be written.
src/App.test.js
src/list/index.test.js
src/input/index.test.js
src/button/index.test.js
Please commit the application to a new branch, once completed. After doing so, we will review the application and get back to you shortly.