GithubHelp home page GithubHelp logo

ekateriina7 / react_todo-app-loading-todos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mate-academy/react_todo-app-loading-todos

0.0 0.0 0.0 1.1 MB

License: GNU General Public License v3.0

JavaScript 72.40% TypeScript 18.11% HTML 0.74% SCSS 8.75%

react_todo-app-loading-todos's Introduction

React Todo App Load Todos

You goal is to implement a simple Todo App that will save all changes to the API.

Here is the working example

The task consists of 3 part:

In this 1st part you will:

  • learn the markup in App.tsx
  • learn src/utils/fetchClient.ts implementations and use it (or delete use any other approaches to interact with API)
  • implement todos loading
  • implement error messages
  • implement filtering by status
  • copy the final code to the 2nd part

General principles

Keep your logic as simple as possible!

Improve user experience:

  • hide or disable elements that can't be used at the moment
  • focus text fields, so user could start typing without extra clicks
  • prevents users from doing the same action twice accidentally (disable controls when action is in progress)
  • show spinners on todos immediately to notify the user that action is in progress
  • update todos only after successful save to the API (tests expect such behaviour)
  • in case of any error show a notification (and hide it after delay)
  • clear input values on success and preserve and focus on error

Tests

Tests help you to check if your implementation is correct.

  • tests are grouped by functionality
  • .skip after it or describe disables a test or a group of tests
  • if you don't understand the test by its name, read its code in cypress/integration/page.js
  • if you can't fix failed test ask mentors for help
  • delays are important for tests, so make sure every request has 100 - 200 ms delay

Load Todos by userID

  1. Register a user by your email here
  2. Save the received userId in the api/todos.ts and use it to load todos
  3. reate some todos using the Demo Page
  4. Load your todos when the App is loaded
  5. hide the list and the footer if there are no todos yet;

Show Error Messages

In case of any error show the notification with an appropriate message at the bottom

  • the notification can be closed with the close button (add the hidden class, DON'T use conditional rendering);
  • automatically hide the notification after 3 seconds;
  • hide the notification before any next request;

You can use a wrong todos URL to test the error.

Filter Todos by Status

Filter todos by status All / Active / Completed:

  • all todos should be visible by default
  • use the selected class to highlight a selected link;

Common Instructions

react_todo-app-loading-todos's People

Contributors

mgrinko avatar mhrynko avatar mykhalenych avatar yuriiholiuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.