Giter Club home page Giter Club logo

todo-app-with-typescript's Introduction

Frontend Mentor - Todo app solution

This is a solution to the Todo app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Add new todos to the list
  • Mark todos as complete
  • Delete todos from the list
  • Filter by all/active/complete todos
  • Clear all completed todos
  • Toggle light and dark mode
  • Bonus: Drag and drop to reorder items on the list

Screenshot

Links

My process

Hello there! Thanks for checking out this project of mine.

This is my 26th frontendmentor challenge and my 6th intermediate frontend project. The project was made using Reactjs with TypeScript and tailwindCSS for designing the app, I just started to learn TypeScript that's why I want to build project written with typescripts. I really thought that it was easy but coding with typescript is pain in the *ss, especially if you're beginner like me, It not easy to me when writing in the props, because there's some props I don't want to used but typescript basically forced us to use it😅.

but I also inlove using typescript, it was just easier to debug because most of the problems you encounter in IDE or in compilation time. You don't need to console.log to check what the problems is. I also encountered that I don't know how to write and It basically forced me to use the any keyword😅. There still many to learn about typescript and I believe it will improve in no time.

Some features on the page that I added:

  • One of the best features of this one is the drag and drop, if you want to change the todo that you want to finish first just drag and drop the items.
  • Local Storage in the browser, I stored the data in local storage so that it will not fade the items after the browser refresh.

Overall, I am very happy with how the application turned out. I am sure it can be improved, but it was a great learning experience that I intend to build upon.

Any additional feedback or a criticism will be appreciated!

Built with

  • JSX
  • CSS custom properties
  • Flexbox
  • TailwindCSS
  • React-beatiful-dnd
  • React - JS library
  • TailwindCSS - For styles

What I learned

TypeScript

TypeScript is a superset of JavaScript which primarily provides optional static typing, classes and interfaces. One of the big benefits is to enable IDEs to provide a richer environment for spotting common errors as you type the code. It looks something like this

export interface TodoListRender {
   id: number;
   todo: string;
   completed: boolean;
   index: number;
   updateItem: (id: number) => void;
   deleteItem: (id: number) => void;
}

I'm having fun on using this typescript because what interface objects looks like then the components function need to also like the interface above.

const TodoItem: React.FC<TodoListRender> = ({
   id,
   todo,
   completed,
   index,
   deleteItem,
   updateItem,
})

Continued development

After finishing this one, I realize that I need to learn more about tailwindcss, typescript and also reactjs especially in react hooks useEffect.

I will finish every frontendmentor challenge as much I take.

Author

todo-app-with-typescript's People

Contributors

benjoquilario avatar

Stargazers

Vergel Macayan avatar Resty avatar  avatar Felipe Holanda avatar Emmanuel Okuchukwu avatar  avatar

Watchers

 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.