yatania / react_dynamic-list-of-todos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React dynamic list of TODOs

Description

You are given a basic markup for the App, TodosList and CurrentUser components and the API.

Add the data loading, so the App works as described below:

  1. Create a separate file api.js to put all the API call there.
  2. Todos are fetched on page load from GET todos endpoint. (Use componentDidMount)
  3. Each todo has a button to select a user but selectedUserId is stored in the App. (pass a callback to the TodoList)
  4. CurrentUser component receives userId as a prop and loads user details from GET user endpoint (replace 1 with a given userId).
  5. If I select another user the details should be updated. (use componentDidUpdate).
  6. If I select the same user there should not be a request to the server.
  7. Add a button Clear into the CurrentUser to clear the selectedUser in the App
  8. Add an <input> to the TodoList to filter the todos by title
  9. Add a <select> to the TodoList to show all, active(not completed) or completed todos.
  10. (*) Add Randomize button to the TodoList to show the todos in a random order.

About


Languages

Language:JavaScript 46.8%Language:SCSS 46.8%Language:HTML 6.4%