GithubHelp home page GithubHelp logo

project-todos-context-vite's Introduction

Todo - useContext Project

This is a site where you can make a to-do-list, mark tasks as completed and/or remove them.

The Problem

We quickly decided to have two lists displayed on the site. One for tasks that weren't completed and one for completed tasks. At first we accomplished this by having two different arrays and letting the checkbox add a task to the tasks-done-list and remove it from the tasks-not-done-list. But this lead to problems when we wanted to move things back from the done-list to the not-done-list. It also required us to have almost every function twice. So we decided to put "done" as a property in every task-object and use .filter to display the tasks in two different lists instead.

At the end we had some extra time, so we added functions to set all tasks as completed and to delete all finished tasks. If we were given even more time we would add the option to add a due date to every task and have that date displayed with the task. We would also add localStorage to save information between renderings.

View it live

https://dulcet-truffle-49ef4e.netlify.app/

project-todos-context-vite's People

Contributors

tejpex avatar lovisaaberg avatar antonellamorittu 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.