The goal of this task is to teach you:
- how to work with a not detailed task description;
- to learn the existing code before you start;
- to understand tests and why they fail;
- to try the working page and implement the same behaviour;
Here is the working page
You are given the markup for the App
, TodosList
, TodoFilter
, TodoModal
and Loader
components. Load data from the API and show it using the given components.
- Load the todos when the
App
is loaded and show them usingTodoList
(check the code in theapi.ts
); - Show the
Loader
when waiting any data from the server (check thecomponents
folder); - Check how the
wait
function is used in theapi.ts
to ensure thatLoader
works as expected; - When the
Show
button is clicked open theTodoModal
with a selectedtodo
; - Don't forget to load user details (replace
1
with the actualuserId
); - Show the Loader while waiting for the user;
x
button should close the modal;- The
select
should filter todos by thecompleted
status:all
,completed
andactive
(not completed) todos; - Use the
input
in theTodoFilter
to filter thetodos
bytitle
;- show the
x
button when thequery
is entered; - the
x
button should clear thequery
and reset the todos;
- show the
- Install Prettier Extention and use this VSCode settings to enable format on save.
- Implement a solution following the React task guideline.
- Use the React TypeScript cheat sheet.
- Open one more terminal and run tests with
npm test
to ensure your solution is correct. - Replace
<your_account>
with your Github username in the DEMO LINK and add it to the PR description.