Modern React CRUD App Project (React ToDo app)

Поделиться
HTML-код
  • Опубликовано: 31 май 2024
  • During the course of this series, we’ll use React to build out a todo app that saves and loads to local storage. The React project will include full CRUD functionality: create, read, update, and delete.
    🔗 Key Links 🔗
    - Github: github.com/coding-in-public/r...
    - Live Project: codinginpublic.dev/projects/r...
    - Theme Switcher Video: • Custom Theme Switcher ...
    ---------------------------------------
    🔗 Additional Links 🔗
    - ES7+ React/Redux/React-Native snippets VSCode Extension: marketplace.visualstudio.com/...
    - Hero icons: heroicons.com/
    ---------------------------------------
    📹 Related Videos 📹
    - Theming CSS: • Custom Color Theme Swi...
    - Better Button defaults: • Creating a Modern Butt...
    - Better Form defaults: • Building Better Form I...
    ---------------------------------------
    ⏲️ Timestamps ⏲️
    0:00 Introduction
    2:27 Lesson 1: Installation and Setup
    5:52 Lesson 2: Creating Add Task Form
    26:55 Lesson 3: Displaying Tasks in a List
    49:26 Lesson 4: Deleting Tasks
    53:46 Lesson 5: Updating Tasks
    57:53 Lesson 6: Editing Tasks
    1:24:01 Lesson 7: Creating Custom Hooks
    ---------------------------------------
    🌐 Connect With Me 🌐
    - Website: codinginpublic.dev
    - Blog: chrispennington.blog
    - Twitter: / cpenned
    - Patreon: / coding_in_public
  • ХоббиХобби

Комментарии • 155

  • @nyashachiroro2531
    @nyashachiroro2531 Год назад +12

    Mannn the quality of your videos is something else, not gonna lie. Keep up the great work man

    • @CodinginPublic
      @CodinginPublic  Год назад

      🙏 glad you’re enjoying them! Thanks for saying something!

  • @hariprasad4917
    @hariprasad4917 Год назад +3

    oh my God, thank you so so much, what a clear explanation.
    Tutorials with projects are the best keep doing these types of video.
    You saved my one week of struggle in 3 hours, I followed along the video and completely understand the concepts
    thank you so so much 🙌

    • @CodinginPublic
      @CodinginPublic  Год назад

      So glad it was such a help! Thanks for taking the time to say something!

  • @ihebbenaicha1353
    @ihebbenaicha1353 Год назад +4

    thank you for keeping this video as beginner friendly as possible .. there are a lot of people who are trying to learn step by step

  • @Quiestre
    @Quiestre Год назад

    that css is insane. really well put together

  • @bobdpa
    @bobdpa 8 месяцев назад

    Great video! This covered way more than I expected. Awesome!

  • @jimmyj.6792
    @jimmyj.6792 Год назад +2

    Another excellent video with awesome explaination chris 👌👏

  • @hazema.6150
    @hazema.6150 2 месяца назад

    Great quality man, really appreciate it.

  • @scorpawe
    @scorpawe Год назад

    brilliant, brilliant, brilliant! love this! a step above most other react devs on yt

  • @Mohamood_jama
    @Mohamood_jama Год назад

    Why is this channel underrated 😐 😕? You have a lot of amazing content. Glad to be here

    • @CodinginPublic
      @CodinginPublic  Год назад

      🙏 thanks so much. That’s very kind. Glad you’re enjoying the channel!

  • @iamenochlee
    @iamenochlee Год назад

    Am speechless, awesome content chris

  • @harel2021
    @harel2021 Год назад +3

    Great content! You are motivating me to start my own channel ✌️

  • @MarshallSC1
    @MarshallSC1 Год назад +1

    How, how, hooow are you this damn good... On this level so fast and in short time... Amazing!
    Maybe one of your future videos should be a tutorial on how to properly learn things and manage your time...

    • @CodinginPublic
      @CodinginPublic  Год назад +2

      Ah, that's very kind. I'm glad you enjoyed it! I'm not sure I have a lot to share there other than that I just keep building and building things until I feel like I understand it well enough to explain it. Being forced to explain it often shows me what I don't understand. And sometimes much later I still realize I didn't understand :)

  • @vasudev16180
    @vasudev16180 Год назад

    Wow man! Keep up your good work 👏

  • @shanli6502
    @shanli6502 Год назад

    can't wait to watch your next video!

  • @shynsky
    @shynsky Год назад

    Great video Chris! I"m waiting for the follow-up with theming. Switching this project to typescript could also be useful for your viewers :) Cheers!

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      Video drops tomorrow! Yes, adding typescript would be a great next step. Tried to just stay focused on React in this video, but that would be my next step to improve it!

    • @Pscytlk
      @Pscytlk 11 месяцев назад

      @@CodinginPublic i didn't found the video.

  • @killswitch.
    @killswitch. 11 месяцев назад

    Best react todo tutorial I've seen...

    • @CodinginPublic
      @CodinginPublic  11 месяцев назад

      Hey, awesome! Glad it was such a help. It's been a while, so I'm sure I'd do some of it differently, but very glad to hear it was still a help!

  • @Dubov1933
    @Dubov1933 Год назад

    First vid of yours I’ve seen, that font tho, wasn’t expecting that lol

    • @CodinginPublic
      @CodinginPublic  Год назад

      And it’s free! Cascadia Code by Microsoft. I like it. :)

  • @ayushjain2499
    @ayushjain2499 6 месяцев назад

    Awesome video bro🎉🎉

  • @viniciusm.m.7822
    @viniciusm.m.7822 Год назад

    Thanks a lot, man!
    God bless you!
    Abraço do Brasil!

  • @MightyKingKala
    @MightyKingKala Год назад

    thank you so much coz u are also teaching how to debug react apps when something doesn't work properly

    • @CodinginPublic
      @CodinginPublic  Год назад

      You’re welcome! Yeah, I try to leave my mistakes in there so long as they might help others.

  • @hardwired89
    @hardwired89 Год назад

    react content yuhuu 😍

  • @IamPetrus
    @IamPetrus 8 месяцев назад +1

    thank you for your work Chris.
    I was wondering when you just start with command combo ' pnpm create vite react - todo ' after choosing React , we are asking to choose TypeScript / TypeScript + SWC / Javascript / Javascript + SWC. What should we choose?

    • @CodinginPublic
      @CodinginPublic  7 месяцев назад +1

      Any of the JS options should work! (or if you want to write TS, that's great, too!) They added SWC as an option after I created this tutorial. It's likely a little faster, but won't matter much in this project. Hope that helps! Enjoy the tutorial!

    • @IamPetrus
      @IamPetrus 7 месяцев назад

      I did!! Thanks again @@CodinginPublic

  • @codeStudioz
    @codeStudioz Год назад

    Great Video!. Damn Awesome. and your terminal looks sick!!!. What theme?

    • @CodinginPublic
      @CodinginPublic  Год назад

      Glad you enjoyed it! I’ve done some videos on my terminal in the past if you’re interested! Theme is Palenight Operator, if I’m remembering correctly.

  • @gtl2695
    @gtl2695 Год назад

    LOVE YOU

  • @naylord5
    @naylord5 Год назад

    Sweet baby Jesus I fall in love with this tutorial, thank you for your amazing content!!!

  • @jocelynnsa9316
    @jocelynnsa9316 Год назад +1

    Your to do app is beautifull

  • @Xamy-
    @Xamy- Год назад

    I would love to see you cover something in Svelete and Solid in the future

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      Me, too! (But I'd have to learn it first :) hopefully sometime soon!)

  • @baka_thyron
    @baka_thyron Год назад +1

    Is it okay to change the way tasks are added to the array in useState( setTasks(prevState => [...prevState, task]) >> setTasks(prevState => [task, ...prevState] ) instead of using sort function in TaskList component? Or was this intentional?

    • @CodinginPublic
      @CodinginPublic  Год назад

      Haha! Yes, that's a much better way to sort them. 🤦‍♂️ Great improvement. Thanks!

    • @quentinmckay8658
      @quentinmckay8658 Год назад

      Good idea. I feel like we could just use reverse( ) too. Slightly cleaner although it's nice to see sort( ) used as well.

  • @takeda3861
    @takeda3861 Год назад

    Thanks

  • @yinkysubwee8550
    @yinkysubwee8550 Год назад

    How does the delete bit work? We pull out the task id and compare it to the id but if we log those values out they are the same two values for all elements. How does it differentiate between element being deleted and others? Hope that made sense

    • @muqtadirshah7317
      @muqtadirshah7317 Год назад

      Not sure what you mean. The filter function filters out all the elements that dont meet a criteria and sends out a new array with those elements. Here we are taking in the id of the todo and filtering it out then resending the array. Not sure if thats what you were asking but yea

    • @CodinginPublic
      @CodinginPublic  Год назад

      The way filter() works is that it makes a comparison for each item in the array. During each loop, we compare the ID passed in to the ID of the loop. In the end we have a new array that excludes anything that doesn’t match the filter. That’s what we then “save” as our list of tasks. Hope that helps!

  • @chadGPTSDE
    @chadGPTSDE Год назад +1

    38:03 I used display: flex; flex-direction: column-reverse; to show the items in descending order, Will there be any issues with that?

    • @CodinginPublic
      @CodinginPublic  Год назад

      Not that I can think of; but it’s probably better to just reverse the order you add them in JS?

  • @mohamedbecha8301
    @mohamedbecha8301 Год назад

    شكرا جزيلا لك

  • @icongrindsetsfj
    @icongrindsetsfj Год назад

    Please release a video explaining all the styling aspects of this project.

    • @CodinginPublic
      @CodinginPublic  Год назад

      I've done most of the individual parts on my channel-like a new button default, form details, etc. Most of the project styling is from those videos. Hope that helps!

  • @mrbeardo5129
    @mrbeardo5129 Год назад

    I am using typescript, getting an error in the code:
    Cannot find name 'setTask' on the line 5.
    On Line 7, Parameter 'e' implicitly has an 'any' type.ts(7006)

    • @CodinginPublic
      @CodinginPublic  Год назад

      I’d have to see the code to be a help. For the second error, you’ll need to identify the e as a synthetic react event. But don’t remember the syntax off hand. Hope that helps!

  • @junk1ord
    @junk1ord Год назад

    Hey man! I was actually curious about your terminal! it's pretty darned stylized! It's better than any of Git Bash, Powershell or CMD!
    1. What is your terminal exactly?
    2. How did you set it as your default terminal for VSC?

    • @ianramirez1577
      @ianramirez1577 Год назад

      The terminal is called zsh
      and this is the line that you have to paste in your settings.json : "terminal.integrated.shell.osx": "/bin/zsh"

    • @CodinginPublic
      @CodinginPublic  Год назад

      Hey, yeah. It's ZSH with oh-my-posh as a terminal theme engine. I explain the basic setup here: ruclips.net/video/DBASd9L4GCo/видео.html
      I was just using oh-my-zsh in this video, but oh-my-posh is even easier to setup. I might do a video on it sometime.

  • @thecoder1631
    @thecoder1631 7 месяцев назад

    planning to do any tuts with firebase/superbase ? thanks ! what font is that in vs code ?

    • @CodinginPublic
      @CodinginPublic  7 месяцев назад

      Yes, at some point! I use both Firebase and Supabase in a few projects. Just haven't ever taken the time to do tuts on them yet. Font is Cascadia Code (free font by microsoft)

  • @valeantigot6390
    @valeantigot6390 Год назад

    enjoy watching your videos! Are you in audea btw?

    • @CodinginPublic
      @CodinginPublic  Год назад

      Great! I don't know what Audea is? so probably not ?

  • @darnzh
    @darnzh Год назад

    Hi Chris, I don't see the styles config in your GitHub repo. Do you mind dropping a link? Thanks. And the tutorial is awesome 💯

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      So glad you enjoyed it! The style documents should be in later branches? like look at lesson-7 branch. Do you see them there?

    • @darnzh
      @darnzh Год назад

      @@CodinginPublic Oh I have seen it. Thank you!

  • @taufiqhidayat8034
    @taufiqhidayat8034 8 месяцев назад

    Hello, sir. I'm here at the end of phase 3. but, when my code runs the results can't appear in the browser with errors like this: react-dom.development.js:26923 Uncaught TypeError: Cannot read properties of undefined (reading 'sort'). How's the solution?

    • @CodinginPublic
      @CodinginPublic  7 месяцев назад

      Thanks for the message! It looks like the state is not holding the data you need. I'd need more context to help you. Sorry! Feel free to post a link and someone can take a link (even if I cant). Thanks!

    • @taufiqhidayat8034
      @taufiqhidayat8034 7 месяцев назад

      Thanks sir, i will check again my code@@CodinginPublic

  • @sergekamga4512
    @sergekamga4512 10 месяцев назад

    Can you share how you customized your terminal prompt and also vscode?

    • @CodinginPublic
      @CodinginPublic  10 месяцев назад

      Sure thing :) ruclips.net/video/DBASd9L4GCo/видео.html is probably what I was using here.
      I've also done a more recent video on my terminal set up here: ruclips.net/video/zhzhTvaFOiw/видео.html

  • @gabrielmwenda8769
    @gabrielmwenda8769 9 месяцев назад

    Hi Chris, I tried pnpm install after extracting the downloaded zip file but I get no package.json found error

    • @CodinginPublic
      @CodinginPublic  9 месяцев назад +1

      Hmm. Did you select the right branch?

    • @gabrielmwenda8769
      @gabrielmwenda8769 9 месяцев назад

      Sorry, I had selected the wrong branch

  • @muqtadirshah7317
    @muqtadirshah7317 Год назад

    Is it possible to add a priority? Say drag and drop to the top and its number one priority? Love the ui great tutorial!😍

    • @CodinginPublic
      @CodinginPublic  Год назад +2

      Sure! I haven’t done drag and drop UI stuff before, but I know there’s an API in vanilla JS; I’m sure there’s also a React library for drag and drop?

  • @megamind452
    @megamind452 Год назад

    Is it okay to use map, filter inside your setState or not.....?,Btw Great video 👍.

    • @CodinginPublic
      @CodinginPublic  Год назад

      Yep, just make sure you’re not mutating state as react doesn’t like that :)

  • @amateruss
    @amateruss Год назад

    I can't seem to make the console log appear in the browser's console. Any ideas?

    • @CodinginPublic
      @CodinginPublic  Год назад

      hmm…not sure? Happy to review code if I have a moment?

    • @amateruss
      @amateruss Год назад

      @@CodinginPublic nvm, it seems to be working fine after making another project. Must have installed it wrong the first time. Thanks for your hardwork.

    • @CodinginPublic
      @CodinginPublic  Год назад

      @@amateruss awesome! No worries!

  • @TheCrowdel
    @TheCrowdel Год назад

    from lesson 6 it's getting to confusing for me, i need to watch it over and over again haha

    • @CodinginPublic
      @CodinginPublic  Год назад

      Ah, sorry. Let me know if you have any questions

  • @sdevaleem2530
    @sdevaleem2530 Год назад

    👌

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      Hope you enjoyed it! It was a lot of fun to put together!

  • @bayzednotes4593
    @bayzednotes4593 9 месяцев назад

    bro which font you use in your vs code

    • @CodinginPublic
      @CodinginPublic  9 месяцев назад

      Cascadia Code. Did a video linked near the bottom of the description.

  • @fahmiazzuhri3943
    @fahmiazzuhri3943 Год назад

    what font do you use?

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      Cascadia code :) I’ve done a video showing how I set it up, too.

  • @noobienate1293
    @noobienate1293 Год назад

    Hi!, what’s the font that you use?

    • @CodinginPublic
      @CodinginPublic  Год назад

      It's called Cascadia Code. It's a free font by Microsoft. More info here: ruclips.net/video/5uETTXxVj8s/видео.html

  • @abdelrahmanelsawy7675
    @abdelrahmanelsawy7675 Год назад

    is "onInput" replace "onChange" ?

    • @CodinginPublic
      @CodinginPublic  Год назад

      No, in this case (as I understand it), you can use either. For whatever reason, React implemented them both to work the exact same way (again, someone correct me if I'm wrong here)

  • @ahmadsofwan4069
    @ahmadsofwan4069 Год назад +1

    Can you teach us how to deploy this project? I faced many errors

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      The easiest way is to run `pnpm run build` and then take the dist folder and drop it here: app.netlify.com/drop. Let me know if you have other questions.

  • @elienetwork8764
    @elienetwork8764 9 месяцев назад

    Hola! que consola estas usando?

  • @akhyar.azamta
    @akhyar.azamta Год назад

    What theme and vscode font do you use?

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      I think in this video I was using Palenight Operator? And the font is Cascadia Code :)

    • @akhyar.azamta
      @akhyar.azamta Год назад

      @@CodinginPublic OK, thanks, I've subscribed 🤝🏻

    • @CodinginPublic
      @CodinginPublic  Год назад

      🙌

  • @Frahane1
    @Frahane1 Год назад

    I'm new to programming and currently learning react (Front-end). I like your tutorial, it's great. But the CSS side is frustrating, it's too complex for Juniors.
    Thanks.

    • @CodinginPublic
      @CodinginPublic  Год назад

      Yeah, this is more complex CSS than a lot of things you’ll find on my channel. Glad you liked the react part though!

    • @Frahane1
      @Frahane1 Год назад

      @@CodinginPublic
      Hey, sorry to disturb but when I try to add Local storage, everything goes blank (not rendering), I don't what I did wrong but I did watch the vid several times but it can't help. Whenever I add the useLocalStorage(), not render on the browser.
      Thanks for helps!

    • @CodinginPublic
      @CodinginPublic  Год назад

      @@Frahane1 Sorry for my delay. Your console should show some errors. Mind sharing those?

    • @Frahane1
      @Frahane1 Год назад

      @@CodinginPublic
      Yes, If you have a telegram, I'd be happy to join.
      Whenever I change the parent (App) useState to useLocalStorage, everything on the browser disappear. I'm using my own CSS (SASS).
      THANKS A LOT.

  • @nadiabenna8375
    @nadiabenna8375 6 месяцев назад

    i didnt find any Project in github ??

  • @sigfigronath
    @sigfigronath Год назад +2

    Whats this terminal ? looks insane

    • @CodinginPublic
      @CodinginPublic  Год назад

      It’s oh my posh added to a oh my zsh theme. I’ll try to throw a blog post or video together about it.

    • @sigfigronath
      @sigfigronath Год назад

      @@CodinginPublic ah cool thanks, I'll check it out too

  • @adiprimanto8871
    @adiprimanto8871 Год назад

    what is the name theme VSCODE?

    • @CodinginPublic
      @CodinginPublic  Год назад

      I think this is Palenight operator? I change up my theme a lot :)

  • @olga.alessandro
    @olga.alessandro Год назад

    Hi Chris! Thank you for the tutorial. The site looks very stylish. Could you please help me to understand my problem? When I load the site from my computer it works. I uploaded files to github and the site is not loading. I couldn't load a folder node_modules to github as it has too many files and github refuses to do so at once. Can that be a problem?

    • @muqtadirshah7317
      @muqtadirshah7317 Год назад +2

      Hey mate, node modules is a big folder and it won't upload since there is an invisibile file called gitignore that blocks it from being uploaded. You can view this by enabling hidden files in file explorer. I reccomend you search a tutorial about uploading react app to github. If you are trying to host the app, then in your terminal run npm run build. If your goal is to host the site I recommend you use firebase instead its much much better.

    • @CodinginPublic
      @CodinginPublic  Год назад +2

      Agree with ⬆️. Only thing I’d mention is Netlify is even a little easier. Look up Netlify Drip. I’d npm run build and then drag that dist folder to that netlify drop.

    • @olga.alessandro
      @olga.alessandro Год назад

      @@muqtadirshah7317 thank you, that's helpful

    • @olga.alessandro
      @olga.alessandro Год назад

      @@CodinginPublic thank you, Chris. It worked!

  • @anhdevga1109
    @anhdevga1109 Год назад

    Can you give me your json vscode config. Thank you bro very much !!!

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      Sure thing. Freshly updated: github.com/coding-in-public/vs-code-settings

  • @briziniattae6202
    @briziniattae6202 10 месяцев назад

    couldn't gind the code on github sir

    • @CodinginPublic
      @CodinginPublic  10 месяцев назад

      Make sure you’re looking under the right branch :)

  • @saugatachatterjee1169
    @saugatachatterjee1169 2 месяца назад

    36:00
    1:13:20
    1:31:30

  • @neiltubioii
    @neiltubioii 2 месяца назад

    Can you give this code. Thank you

    • @CodinginPublic
      @CodinginPublic  2 месяца назад

      In the description. Just make sure to select the right branch.

  • @oook3407
    @oook3407 Год назад +1

    source code?

    • @CodinginPublic
      @CodinginPublic  Год назад

      Description :)

    • @mann_gupta
      @mann_gupta Год назад

      @@CodinginPublic github doesn't have source code

    • @IamPetrus
      @IamPetrus 8 месяцев назад

      @@mann_gupta Agree. It does not have css code

    • @IamPetrus
      @IamPetrus 8 месяцев назад +1

      @@mann_gupta sorry, you will find source code in the right branch. There is one branch for each lesson. Apologies ...

  • @citizensky
    @citizensky Год назад

    Good Try but Way too fast from lessons 4 on, it seemed like you were just wanted to get it over with while looking at your solution already.

    • @CodinginPublic
      @CodinginPublic  Год назад

      Thanks for the feedback. I tried to speed up once I was repeating things I'd already taught, but it's good to know it felt too rushed. Thanks again.

  • @dusko8989
    @dusko8989 3 месяца назад

    After a wile i regret watching this video.
    saying here instead of file name and making that mistakes and navigating trough app was really painfull

    • @CodinginPublic
      @CodinginPublic  3 месяца назад

      I’m not sure I understand your comment, but I’m sorry you didn’t enjoy the video

  • @studentimantha5345
    @studentimantha5345 Год назад