Todo List in ReactJS using TypeScript Tutorial

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 115

  • @amt3025
    @amt3025 2 роки тому +14

    Really good tutorial, well done. On a side note, at 34:23 if you filter by task name and there are 2 tasks with the same name it will delete them both. Instead, you can filter by key/index. In real-life applications usually, data that comes from some DB will always have pk/id. In this case, we use the pk/id of the object to define the key of the row and to delete the task object from our state.

    • @timuramiraliev7452
      @timuramiraliev7452 Рік тому

      thank you man)

    • @eriklamela4321
      @eriklamela4321 Рік тому +1

      you might as well do a hash map for all todos, not to traverse the whole list when deleting

  • @johneiler4051
    @johneiler4051 2 роки тому +10

    Great video!
    Just a note, if using FC or React.FC for a component like the one at 28:30, you will write "" next to FC/React.FC, instead of ":Props" next to the props object parameter.

  • @Ctrl_Alt_Elite
    @Ctrl_Alt_Elite 2 роки тому +6

    0:00 Intro & Project Overview
    1:34 Project Setup (using Create React App)
    5:09 App Component - Component Type & JSX markup
    8:23 Adding & explaining CSS snippets
    11:52 Setting up state - useState in TypeScript
    14:00 Change handler - track user input
    18:43 Click handler - Adding a task to 'todoList' state
    19:45 -- defining and setting the Type of 'todoList' using an interface
    23:50 -- clearing inputs after adding new task
    24:54 Working with components - creating TodoTask - represents a single todo task
    27:17 -- accepting component props
    29:58 -- writing markup (JSX/TSX) & styles for TodoTask component
    33:08 Complete/delete task functionality in App.tsx
    36:52 Testing final app
    37:43 Outro

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      Wow! Thank you so much for the timestamps, really appreciate u doing this! WIll add it to the video :)

    • @Ctrl_Alt_Elite
      @Ctrl_Alt_Elite 2 роки тому

      @@PedroTechnologies UA-cam gave me the notification 5 years later lol. No problem, keep up the great work!

  • @liondepierre
    @liondepierre 2 роки тому +2

    I've seen a lot of tutorials but this is by far the most down to earth tutorial I've seen. Thank you!!

  • @sleepyadults
    @sleepyadults 2 роки тому +9

    Nice, when you are importing the functional component structure.. you could do rafce instead of rfce. It will generate the arrow function syntax straight away.

  • @Shakeel714
    @Shakeel714 3 роки тому +4

    Thanks so much bro. Learned so much about React basics and Typescript. Your other tutorials are also very good. You explain complex topics very nicely. Wish your channel grow exponentially.

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +3

      THank you for your kind words! I am really happy that I was able to help you learn! I have really high hopes for the channel, but for now im just enjoying the journey!

  • @nxxdev7926
    @nxxdev7926 2 роки тому +4

    if you dont have "YARN" you can ** execute npx create-react-app my-app --template typescript **

  • @oo5z263
    @oo5z263 2 роки тому +1

    Your explanation is so clear and direct! Thanks a lot:)

  • @vargasbj
    @vargasbj 2 роки тому

    Oh wow Pedro .
    Yeah is very simple to-do but you did a master-peace
    You never went to deep if it was not necessarily but when it was you dogged in perfectly when clear explanations. I am old person but recently start to React and wow this really helped me
    Congrats !!!

  • @muhammadhamza5296
    @muhammadhamza5296 3 роки тому +2

    Oh man u are amazing I just started to learn typescript yestday

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Hahaha thank you! I am glad i could help! If you want i have a video as well teaching how to transition from javascript to typescript! Link is in the description!

  • @HR-pz7ts
    @HR-pz7ts 9 місяців тому

    Really well done. Thank you for sharing. I have a good understanding of all except the key part which I think I will get comfortable with in the future.

  • @wiliansilvadeoliveira774
    @wiliansilvadeoliveira774 2 роки тому

    Pedro, estou tão feliz em achar seu canal, seu inglês é tão bom e calmo, o conteúdo é muito útil.

  • @k303k
    @k303k Рік тому

    You are my best programming teacher!

  • @Pedro21Torres
    @Pedro21Torres 3 роки тому

    Thank you Pedro, you are so good explaining and everything is so clear.
    Your channel is helping a lot of people for sure!

  • @matkl55
    @matkl55 3 роки тому +1

    Quando comecei o video pensei: "esse cara so pode ser brasileiro" (por causa do sotaque kkkk)
    quando eu vi o nome do canal PedroTech dai eu tive ctz que vc era brasileiro. Parabens pelo trabalho mano

  • @ThColinPereira
    @ThColinPereira 3 роки тому +1

    absolute banger! thanks for the amazing content as always pedro

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      thank you so much! you have no idea how much this means to me!

  • @NehaKumari-dr7gs
    @NehaKumari-dr7gs 3 роки тому +3

    Thanks for making this in typescript :)

  • @LucasRodrigues-ze3yd
    @LucasRodrigues-ze3yd 3 роки тому +1

    Wouldn't be enough setting the prop in TodoTask as below?
    const TodoTask = (task: ITask) => {
    ...
    }
    Anyway, thanks for the video! Ur channel is awesome!

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +1

      Hey, so it depends because I don't think it would work for multiple props. The standard way is creating an interface and restructuring it like in the video. This confused me a lot in the beginning, but it makes sense cause it allows for more organized code.

  • @mitch1668
    @mitch1668 8 місяців тому

    Pedro, hope all is well. Curious, why did you use interface instead of type? Do you typically use interface?

  • @denisjunior1086
    @denisjunior1086 2 роки тому

    great video man! You're helping me a lot with your videos.

  • @steven7936
    @steven7936 3 роки тому +2

    Thank you for this video, I really leveled up my typesript!!!

  • @padcom
    @padcom 3 роки тому +1

    Thanks for the tutorial. It's been fun to watch. One thing though, and I can't fathom why it shows up in tutorials like that over and over and over again. DRY. Why do people repeat themselves so many times. task.taskName (why not just task.name?) ITask? Does it really matter that it is an interface? Why not just Task? Same thing with naming folders and files (totally not in your tutorial but comes time and time again in others) like components/todo/TodoEditor.tsx instead of components/todo/Editor.tsx.

  • @daromacs
    @daromacs 2 роки тому

    subscribed man, a great job and effort from you doing this videos :) thanks

  •  2 роки тому

    Great!! Straightforward intro to ReactJs - TypeScript👌

  • @naveenkumaravelmurugaian4891
    @naveenkumaravelmurugaian4891 3 роки тому

    Perfect video for react using TS!

  • @JoDeCityBreaks
    @JoDeCityBreaks 3 роки тому +1

    Thanks for this tutorial !💚

  • @netsaichiyaka9469
    @netsaichiyaka9469 Рік тому

    This is a very informative video. I saw it very well.

  • @valentinaotocan5692
    @valentinaotocan5692 Рік тому

    Please, more video like this :D. Typescript & React.js 😊

  • @perfectigbadumhe113
    @perfectigbadumhe113 3 роки тому +3

    cool tutorial learnt a lot can you make CRUD react project using typescript redux, axios and styled component

  • @mrugamajmudar5433
    @mrugamajmudar5433 2 роки тому

    Thank you once again! this is really helpful

  • @deepakjangid3872
    @deepakjangid3872 3 роки тому

    Thanks for the video, the explanation was very clear! 🥁

  • @Julian-oy7dy
    @Julian-oy7dy 3 роки тому +1

    This is a very informative video. I saw it very well.
    It would be great if there was a video that implements master details with the ts-react-dbms-bootstrap skill.

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Thank you for watching! Yeah i can definitely add that to my list of future videos!

  • @DBDrumss
    @DBDrumss 3 роки тому +3

    Good job! An incredible and very useful tutorial, I have a question with the "completeTask" function, if two tasks have the same name and you filter the task with that function, the two tasks would be deleted, right?

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +1

      Thank you! Yeah if they have the same name it would delete both, ideally you could add an id for each task and filter by id. I didn't do that so I wouldn't overcomplicate the video!

    • @DBDrumss
      @DBDrumss 3 роки тому

      @@PedroTechnologies Great, it's just what I thought, right now I'm trying to make one on my own, could you tell me what extra features I could add to the app as a practice, and challenge Thanks!

  • @rohan1765
    @rohan1765 3 роки тому +2

    Thank you so much , it helped alot

  • @lautaro17
    @lautaro17 3 роки тому +1

    Good video bro! new subscriber 😄

  • @prasanthmanimaran5158
    @prasanthmanimaran5158 3 роки тому +1

    Thank you so much for this, brother.

  • @ivgadev
    @ivgadev 3 роки тому +2

    Good tutorial man. I recently discovered you and have a great updated content. Can I ask you why yo use :FC in App arrow function but not in a component? Thank you

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +1

      Thank you! Really appreciate the support! There are two ways of defining props to components in typescript, one of them is by making it a React.FC component and passing the prop interface like this: and there is the other way which is how i did in the video. I wanted to show both ways but accidentally forgot to explain the first one. Sorry about that, you can write components in both ways, I recommend the second one without the React.FC

    • @ivgadev
      @ivgadev 3 роки тому

      @@PedroTechnologies Thank you very much for your quick response. I'm watching video after video right now, if you get a lot of views it's my fault lmao. Seriously, good content, updated and with good practices, just what I needed, keep it up! :)

  • @amritamatta
    @amritamatta 2 роки тому

    very well explained ..excellent job

  • @ozzyfromspace
    @ozzyfromspace 3 роки тому

    Pedro, you're a friggin lifesaver! Thank you for making this video! Petition to make literally everything tomato red 😂🎊❤️☮️🏆 Keep up the excellent work bro

  • @ariefsetiawan8445
    @ariefsetiawan8445 3 роки тому +1

    nice, go ahead dude💻

  • @Pareshbpatel
    @Pareshbpatel Рік тому

    Excellent demo of using TS in React. Thanks, Pedro
    {2023-04-13}

  • @pedrohelias4689
    @pedrohelias4689 3 роки тому

    Valeu Pedrão, vídeo ajudou bastante!

  • @damilolaezekiel4331
    @damilolaezekiel4331 2 роки тому

    How to I get to validate the inputs
    i.e If the input fields are empty, it should return an error beneath the input like input fields are required
    However, I really learnt alot from the video thank you so much

  • @Noppepoppe
    @Noppepoppe Рік тому

    Really good video!

  • @АБерс
    @АБерс 2 роки тому +1

    Thank you bro!

  • @TheNamesJT
    @TheNamesJT 3 роки тому +2

    you have really good tutorials happy i stumbled across your channel. could you make a tutorial for a desktop app using any js framework like electron, nw,js or any other one you want. Also, could you make a video on client data saving aka no database no server this would be more plausible with desktop app creation since people can download the app and data can be stored and saved on clients computer. I just don't know how to do this and have looked on google about it no real tutorial or course that covers this.

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +1

      I have prior experience with electron (i also have a video on it), so I can definitely make a video teaching how to create a simple electron app and save data!

  • @yulduz2506
    @yulduz2506 9 місяців тому

    very helpful thank you very much

  • @윤재희-m6k
    @윤재희-m6k Рік тому

    Thanks master!!!!

  • @sonamohialdin3376
    @sonamohialdin3376 2 роки тому

    Very useful tutorial

  • @mansilaad2062
    @mansilaad2062 3 роки тому +1

    Nice.. Plz make video on angular

  • @JJ-ot3ps
    @JJ-ot3ps 2 роки тому

    hey Pedro, I saw link usually is created like the following code in real life project typecripts, but it is a bit confusing, can you explain it a bit more in your video?
    import NextLink, { LinkProps as NextLinkProps } from 'next/link';
    const Link: React.FC = ({
    href,
    children,
    ...props
    }) => {
    return (

    {children}

    );
    };
    export default Link;

  • @musmankkr
    @musmankkr 6 місяців тому

    Great Video.

  • @lydiahkariuki-q7n
    @lydiahkariuki-q7n 3 місяці тому

    Great Job

  • @sevdaamini9430
    @sevdaamini9430 3 роки тому +1

    Isn't it create-react-app? Mine didn't work with the separate Create :)

  • @arccoder6181
    @arccoder6181 3 роки тому

    Which extension you use for showing warnings and errors?

  • @rohan1765
    @rohan1765 3 роки тому +2

    In the components which receives props if we specify component type as FC it gives error.

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      When you use the FC, props are passed differently!

    • @rohan1765
      @rohan1765 3 роки тому

      @@PedroTechnologies got it in the angular brackets next to it , solved , thanks 👍🏻

  • @kaal_bhairav_1835
    @kaal_bhairav_1835 2 роки тому

    Bro, how can i implement map() function in the component rather than index.tsx page.
    I am trying to pass whole object array as props in the component but getting type error. Please explain me if you know the solution , any help is appreciated ❤️

  • @nested9301
    @nested9301 Рік тому

    Why not a class for describing the actual Todo entity

  • @hawks2271
    @hawks2271 Рік тому

    Thanks 🇧🇷

  • @pelosmeusolhos938
    @pelosmeusolhos938 3 роки тому

    thank you!

  • @alques-dias
    @alques-dias 2 роки тому +1

    Acabei de conhecer o canal, sensacional seu conteúdo.

  • @alasassi960
    @alasassi960 2 роки тому

    I have tried this with context api and i find it difficult to use it especially when I put functions to it

  • @mofe620
    @mofe620 2 роки тому

    Thanks a lot

  • @angelv2485
    @angelv2485 3 роки тому

    really helpful

  • @umerfarooq3121
    @umerfarooq3121 3 роки тому +1

    Do this same with js as well. Thank you

  • @PeriklesPeriklesoglu
    @PeriklesPeriklesoglu 9 місяців тому

    thank you

  • @Shin-jj3qt
    @Shin-jj3qt 2 роки тому +1

    No update function??

  • @mohammedbalousha9467
    @mohammedbalousha9467 2 роки тому

    Thank you so much for your effort, and I think making your videos shorter, will be nice

  • @shaheerarain1026
    @shaheerarain1026 Рік тому

    Please make a video how to import images in react using typescript. Please...............

  • @parthapaul1249
    @parthapaul1249 2 роки тому

    KIndly make a mern series with TS

  • @ionuttrif8378
    @ionuttrif8378 2 роки тому

    How can I use the localStorage to keep the list intact between renders?

    • @theundergroundsm
      @theundergroundsm 2 роки тому

      localStorage.setItem("todolist", JSON.stringify(todoListSate)) // to set the todoState in your localStorage
      JSON.parse(localStorage.getItem("todolist")) // to get the todoState from your local storage

  • @imusikproduction9069
    @imusikproduction9069 3 роки тому +1

    Super Like this video

  • @MarcosEsqueda
    @MarcosEsqueda 3 роки тому

    Hi! Pedro. I want to make PR! Add an additional validation if a task is empty. Could I do it?

  • @siroojuddinapendi6213
    @siroojuddinapendi6213 Рік тому

    Great!!!

  • @abdusamadweb9812
    @abdusamadweb9812 2 роки тому

    how to create with npm ???

  • @shivshankar654
    @shivshankar654 2 роки тому

    bro do the crud in typescript and context using react js

  • @Sozick_
    @Sozick_ 3 роки тому +1

    Liked and subbed :-)

  • @BilalKas
    @BilalKas 2 роки тому

    25:30

  • @alexandre-ob1nf
    @alexandre-ob1nf 3 роки тому +1

    Bom inglês, nem parece br

  • @lucianlsd3274
    @lucianlsd3274 Рік тому

    Most confusing props explanation in the history of ts props explanations; overall lacking teaching conduct

  • @maikyroger636
    @maikyroger636 2 роки тому

    you said no time wasting whit css... and then talked about it for almost half the video. lol