How To Create An Advanced Shopping Cart With React and TypeScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • FREE React Hooks Course: courses.webdevsimplified.com/...
    Learn React Today Course: courses.webdevsimplified.com/...
    Shopping carts are one of the most common things you will build as a web developer, but there is a lot that goes into building a good shopping cart. In this video I will show you how to build a fully functional shopping cart using React, TypeScript, and Bootstrap. This is a great intermediate level project.
    📚 Materials/References:
    FREE React Hooks Course: courses.webdevsimplified.com/...
    Learn React Today Course: courses.webdevsimplified.com/...
    GitHub Code: github.com/WebDevSimplified/r...
    🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    ⏱️ Timestamps:
    00:00 - Introduction
    00:30 - Demo
    01:08 - Project Setup
    04:45 - Routing
    08:02 - Navbar
    15:35 - Store Page
    30:00 - Shopping Cart Context
    44:40 - Shopping Cart Component
    56:45 - useLocalStorage Hook
    #TypeScript #WDS #React

ความคิดเห็น • 314

  • @yoJuicy
    @yoJuicy 2 ปีที่แล้ว +20

    Off topic, but I had been looking for a React Hooks course and didnt realize you just made one! going to complete it this week. Thank you for consistent, high quality content. you are helping thousands of developers across the globe!

  • @rvft
    @rvft 2 ปีที่แล้ว +14

    Literally one of the best channels on the platform. Always bringing stuff that we all are in need of! Thank you so much for all the effort, you can't even imagine how much you are helping us! God bless you.

  • @riyadhossain1706
    @riyadhossain1706 ปีที่แล้ว +10

    This tutorial is really helpful to those who started integrating TS with React. Thanks a lot.

  • @pedrolefteen
    @pedrolefteen 2 ปีที่แล้ว +14

    A huge result for an one hour duration tutorial. Thank you!

  • @jenso413
    @jenso413 2 ปีที่แล้ว +1

    your videos are so good, they show me how much more I have to learn to make truly professional sites like this. I’ve finally gotten to the point I can make full stack web apps, and I’m proud of myself for that, but my code always feels sloppy and unorganized. thanks for the inspiration!

  • @ninanordbo
    @ninanordbo 2 ปีที่แล้ว

    You make excellent content! Watched an older video on ditchin else statements last night and l am truly inspired by your way of deconstructing problem-solving. Your content is always on par so would just like to thank you for putting so much work into helping others become better developers. Brilliant!

  • @anasalhariri5474
    @anasalhariri5474 2 ปีที่แล้ว +255

    I want to thank you man, with your awesome courses and tutorials I finally got my first job. I deeply appreciate your great efforts. Huge love and respect. Stay awesome as always.

    • @ManojKumar-iu3zh
      @ManojKumar-iu3zh 2 ปีที่แล้ว +3

      Front end developer?

    • @anasalhariri5474
      @anasalhariri5474 2 ปีที่แล้ว +15

      @@ManojKumar-iu3zh Yes, Front-End Web Developer with ReactJS

    • @anweshandev
      @anweshandev 2 ปีที่แล้ว +9

      Congrats to you man !!

    • @anasalhariri5474
      @anasalhariri5474 2 ปีที่แล้ว +5

      @@anweshandev thanks bro

    • @AnsBdran
      @AnsBdran 2 ปีที่แล้ว +7

      Congrats, but how long does it take to get your first job?

  • @EzeJ99
    @EzeJ99 2 ปีที่แล้ว +20

    Your content is SICK! Please do more React-TypeScript, i would love to see you coding a MERN + TypeScript project

  • @tomiebayly6085
    @tomiebayly6085 2 ปีที่แล้ว

    hey i appreciate that you show the product in the demo part which let us visualize how the project going to turn out
    big thanks man

  • @Rahulyadav-lv7dh
    @Rahulyadav-lv7dh 2 ปีที่แล้ว +2

    was waiting for typescript project from a long time fr. Thanks kyle ,really looking forward to building this

  • @noorsh
    @noorsh 2 ปีที่แล้ว

    Thank you for this. Great one. I've finally got a good grasp on how to use TypeScript in a real world situation. Thanks again

  • @andgoedu
    @andgoedu ปีที่แล้ว +1

    Dude your videos are freaking awesome , i usually learn from people like yourself sir , and turn these projects into a full stack project connect an api , backend and so on , on my own i just wanted to say your awesome and keep up the simplicity

  • @johnherrera5913
    @johnherrera5913 ปีที่แล้ว +1

    Master! One of the best tutorials I have ever watched. Thank you !!!

  • @isaacopeyemirobert7868
    @isaacopeyemirobert7868 2 ปีที่แล้ว

    the reason i love kyle web dev simplified is that you learn a lot in a short amount of time..

  • @Thassalocracy
    @Thassalocracy ปีที่แล้ว

    Thank u SO much, the parts about handling typescript and the local storage have been extremely illuminating for me. I honestly am thinking about buying the full course😃

  • @chadcat420
    @chadcat420 6 หลายเดือนก่อน +1

    this tutorial is awesome! made me understand typescript better instead of struggling on my own

  • @brenosantin9739
    @brenosantin9739 ปีที่แล้ว

    awesome, it’s hard to find react videos that uses typescript, loved the video. thanks kyle

  • @salma_techie
    @salma_techie ปีที่แล้ว

    Kyle I want to thank you for teaching me... actually when am searching anything I have to add your name to see if you posted anything on that topic.. thanks so so much brother.

  • @martinmohammed4087
    @martinmohammed4087 2 ปีที่แล้ว +2

    It was a very nice tutorial. Especially because this video is so up to date (React V18, React Router Dom V6). Thanks for everything, I learned a lot.

  • @asher4818
    @asher4818 ปีที่แล้ว

    Dude, you are super super super good. You make me realize how far I have to go. Thank you for the great content.

  • @VishalKumar-dv6qj
    @VishalKumar-dv6qj 2 ปีที่แล้ว +3

    I know it's going to be very helpful. Thank you very much. This is all that I needed.

  • @farzadmf
    @farzadmf 2 ปีที่แล้ว +1

    Happy to see TypeScript videos, hoping to see more

  • @Visinho4ever
    @Visinho4ever 10 หลายเดือนก่อน +1

    I love your style. Simple and precise. Keep it up sir!!!🥰

  • @physcript2436
    @physcript2436 2 ปีที่แล้ว

    after watching this
    i finally subscribe for 2 years watching your video's sorry and thank you this is gold

  • @buddy.abc123
    @buddy.abc123 2 ปีที่แล้ว +1

    Thank you for everything you do for the community

  • @LuisReyes-zs4uk
    @LuisReyes-zs4uk 2 ปีที่แล้ว +1

    wow, dude, just wow. you're an absolute beast and I want to be as good as you. thanks for the awesome tutorial.

  • @piotrekjazz1287
    @piotrekjazz1287 ปีที่แล้ว

    Kyle, that one with TS trully helps, thank you so much, one day I will buy you a big coffee, promise

  • @rafaelsperati
    @rafaelsperati ปีที่แล้ว

    Congratulations! A nice example on how to apply the useContext hook!

  • @brilliantatosam6882
    @brilliantatosam6882 ปีที่แล้ว

    Exactly what I was looking for.
    Bless you Kyle

  • @tamlselvan9072
    @tamlselvan9072 2 ปีที่แล้ว +3

    I expected you would do in typescript in future but it happens now wow

  • @adeleke5140
    @adeleke5140 ปีที่แล้ว

    Thank you Kyle for this amazing tutorial. Really helped me.

  • @ilan117
    @ilan117 ปีที่แล้ว

    Kyle … Thank you for everything you do a gazillion times over. ❤️

  • @johntimothygarcia
    @johntimothygarcia 10 หลายเดือนก่อน

    I like the way you explain every detail sir, it helps me alot to understand every functions and details in this Typescript tutorial. Thank you sir.

  • @bendevweb89
    @bendevweb89 2 ปีที่แล้ว

    Great informative project well built, thank you Kyle

  • @omnimathic
    @omnimathic 11 หลายเดือนก่อน

    Very smooth brother. Amazing video

  • @cwirus99
    @cwirus99 2 ปีที่แล้ว +2

    No way! 🤩 I am just about to build a shopping cart for my project and was wondering if there was any comprehensive guide for it. And bam! A notification from WDS!
    Great video, thanks a lot!

  • @Karrnfr
    @Karrnfr ปีที่แล้ว

    Thanks a lot, Kyle for the tutorial. Really appreciate it

  • @luisbraga3394
    @luisbraga3394 9 หลายเดือนก่อน

    Excellent video! Thanks for sharing your knowledge!

  • @victorromeo949
    @victorromeo949 2 ปีที่แล้ว +1

    Spent the whole day doing this, my confidence is going up at the speed of light. 26th June 2022

  • @camilahatakeyama7506
    @camilahatakeyama7506 ปีที่แล้ว +27

    Just a quick note: React-Bootstrap's documentation says that "You should import individual components like: react-bootstrap/Button rather than the entire library. Doing so pulls in only the specific components that you use, which can significantly reduce the amount of code you end up sending to the client." So in this video's case, the import ideally would be 'import NavbarBs from 'react-bootstrap/Navbar''

    • @kybkap8686
      @kybkap8686 ปีที่แล้ว

      i thought no difference because you imported 'bootstrap/dist/css/bootstrap.min.css' in the index.js anyway or not?

    • @camilahatakeyama7506
      @camilahatakeyama7506 ปีที่แล้ว +7

      @@kybkap8686 The import I mentioned is only related to the react-bootstrap JavaScript library and not the bootstrap css that you talked about.

    • @adeleke5140
      @adeleke5140 ปีที่แล้ว

      Good advice, you might need to import it as a named import though to be able to rename it properly.

  • @anrikopaliani5551
    @anrikopaliani5551 ปีที่แล้ว

    nice video! I hope u will upload more react projects with typescript in the future.

  • @Technoph1le
    @Technoph1le 2 ปีที่แล้ว

    Thank you so much. Hope to see more videos like that

  • @samintahmidislam
    @samintahmidislam 2 ปีที่แล้ว +4

    Your videos are amazing! I'm learning a lot from you. Keep going my man!

  • @niklassoderberg2168
    @niklassoderberg2168 ปีที่แล้ว

    This video is one of your best ones!

  • @salma_techie
    @salma_techie ปีที่แล้ว +29

    my best trick of learning is by putting the video at a speed of 0.75 then putting youtube on one side of my window and on the other side my code editor.. even thou the code exists on github, I practice bit by bit until the end of the video. Hope it helps some of you guys. Goodluck :)

    • @kmilo901001
      @kmilo901001 ปีที่แล้ว +6

      Rewriting code is a good method of getting better at coding.

    • @AbdulBasetWangde
      @AbdulBasetWangde 8 หลายเดือนก่อน

      I do the same and I think almost everyone should that as that really helps in learning and grasping the concepts which you can never learn just by watching:)

    • @user-zv6bv7eu8k
      @user-zv6bv7eu8k 8 หลายเดือนก่อน

      I thought this was implied to be honest, idk why else someone would wanna watch this lmao

  • @abdulazeezolanrewaju843
    @abdulazeezolanrewaju843 2 ปีที่แล้ว

    More of this is needed!!
    Thanks Kyle!
    Please try to use something like chakraUi next time sir!

  • @FaisalAmin001
    @FaisalAmin001 2 ปีที่แล้ว +2

    Thanks you,
    please also make a video on React testing , Jest etc

  • @ryanwoods3333
    @ryanwoods3333 ปีที่แล้ว +1

    more React and TypeScript content please!

  • @edisvelicanin8854
    @edisvelicanin8854 2 ปีที่แล้ว +2

    Great work. Super nice. Everyone who watched this, should try to build an admin area, where you can add and remove items.

    • @appuser
      @appuser 2 ปีที่แล้ว +1

      I might just do that! Always good to have some unguided homework!

  • @user-of9uy9bf6e
    @user-of9uy9bf6e 9 หลายเดือนก่อน

    You're a gem in this man

  • @taroserigano6546
    @taroserigano6546 2 ปีที่แล้ว

    i was waiting for your Typescript App!!!!

  • @theisoj
    @theisoj 2 ปีที่แล้ว

    Thanks Kyle for this tutorial!

  • @uthmanabdullahi4590
    @uthmanabdullahi4590 4 หลายเดือนก่อน

    This is really helpful

  • @bboydarknesz
    @bboydarknesz 2 ปีที่แล้ว +1

    this is sick bro!
    love it!
    maybe just need a little optimization of how to get the data, because it has so much looping in data.
    I don't know, maybe we do it because we works in local data json?

  • @vaswna14
    @vaswna14 ปีที่แล้ว

    You are amazing !!! Thank you for your tutorial Videos...!!! 🥰

  • @mpowereer6992
    @mpowereer6992 2 ปีที่แล้ว

    great tutorial!! more typescript!!!!

  • @duvu9760
    @duvu9760 ปีที่แล้ว

    really helpful man, thanks so much

  • @vladmob
    @vladmob ปีที่แล้ว

    Awesome video!❤ Thanks a lot!

  • @jamalkheirbeik
    @jamalkheirbeik 2 ปีที่แล้ว

    Good stuff as always kyle

  • @NoobishxPhenom
    @NoobishxPhenom ปีที่แล้ว

    How would you customize the default bootstrap colors here? Im trying to change the theme of the website

  • @MSEIN2303
    @MSEIN2303 7 หลายเดือนก่อน

    The training was excellent but very fast❤❤😍

  • @ziadx3
    @ziadx3 10 หลายเดือนก่อน

    this video is incredibly useful!

  • @LalaYamazaki
    @LalaYamazaki ปีที่แล้ว

    Great video. Followed step by step and completed the whole project! Thank you! If possible, upload more of these!

  • @YahiaHegazy
    @YahiaHegazy ปีที่แล้ว

    Wow! I have a question regarding the syntax. You placed ?.quantity after the find, what does this do? Thank you!

  • @regilearn2138
    @regilearn2138 2 ปีที่แล้ว +1

    Like this please do Fully loaded MERN project with typescript, which include all the real-world example.

  • @carosendahl
    @carosendahl ปีที่แล้ว

    I have a question. I love your tutorials by the way. I was coding along with the video, and somehow my environment tweaked out and started complaining that ShoppingCartContext was a namespace as a type error, and I couldn't fix it. I had to delete the entire project and start over. Do you know what causes this error and why it totally messes up the react environment? Sometimes (many times) I am an idiot, and I just can't figure it out :)

  • @rariboys8366
    @rariboys8366 2 ปีที่แล้ว

    Hey kyle, is there a reason why you used a normal variable for cartQuantity instead of using useState, thank you.

  • @YondeCode
    @YondeCode 6 หลายเดือนก่อน

    Thank you for this super course ! I am just wondering the last part with the custom hook where we use a generic type T

  • @elvinqurbanov6669
    @elvinqurbanov6669 7 หลายเดือนก่อน

    Thank you for perfect video

  • @RavindraSingh-lp9pl
    @RavindraSingh-lp9pl 3 หลายเดือนก่อน

    Superb awesome tutorial

  • @Aarron656
    @Aarron656 2 ปีที่แล้ว

    If the premium course package was cheaper I would buy it for sure!

  • @jetchmeraldsecoyamadaya3599
    @jetchmeraldsecoyamadaya3599 6 หลายเดือนก่อน

    I am having this error when I am using props in my storeitems
    'StoreItem' cannot be used as a JSX component.
    Its type '({ id, name, price, imgUrl }: any) => void' is not a valid JSX element type.
    Type '({ id, name, price, imgUrl }: any) => void' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
    Type 'void' is not assignable to type 'ReactNode'.

  • @williamroncallo7926
    @williamroncallo7926 ปีที่แล้ว

    The route example did not work for me; I had to add the element in the app component, wrapping all of the return code in it

  • @georgy2763
    @georgy2763 ปีที่แล้ว

    Can someone explain please why useLocalStorage can have initialValue as a function that returns generic? What is the use case of that, I am a bit confused

  • @valeriousmonk654
    @valeriousmonk654 2 ปีที่แล้ว

    More videos like this. Thank you

  • @marcuspowers9455
    @marcuspowers9455 9 หลายเดือนก่อน +1

    Could you make a video on all the keyboard shortcuts you use?

  • @tejasnikam3287
    @tejasnikam3287 ปีที่แล้ว

    Awesome as always

  • @wyneeoo
    @wyneeoo ปีที่แล้ว

    you're awesome as always : ) Thanks a lot.

  • @berkaycirak
    @berkaycirak ปีที่แล้ว

    Thanks for sharing man, I have a question to you. Should we use "Decorators" while working on a React project

  • @markperrycr02
    @markperrycr02 2 ปีที่แล้ว

    Hi Kyle, what does createContext and useContext actually do?
    Thanks!

  • @wallyssonlima2705
    @wallyssonlima2705 ปีที่แล้ว

    You’re amazing!! 👏🏻

  • @mekansahatvaliyev724
    @mekansahatvaliyev724 ปีที่แล้ว

    your videos are amazing

  • @TheIndy81
    @TheIndy81 2 หลายเดือนก่อน

    Great videos! just a question, why that "as NavLink" needed in the NavBar?

  • @yugeshkk3062
    @yugeshkk3062 ปีที่แล้ว

    Thank you very much Kyle...

  • @kybkap8686
    @kybkap8686 ปีที่แล้ว +1

    thank you kayle very nice tutorial. I wish if you made an express server connected to mongo db and put items there and maybe login route as seller (who will post items to db ) and a login as customer. but i will try to do these )

  • @konstantinreut2577
    @konstantinreut2577 6 หลายเดือนก่อน

    Great job, Kyle! Unfortunately, after deployment thid project on Github pages all images dissapeared. I've tried different ways to fix it . Nothing helped. Anybody know how to fix it? Thank you in advance!

  • @miq_5239
    @miq_5239 2 หลายเดือนก่อน

    Yoo nice tutorial man. I used the 'useCallback' hook on your functions inside the context tsx file to prevent unnecessary re-renders if the state variable is being updated. just wanted to ask if you think this is necessary. Thanks in advance

  • @jordantanaliga100
    @jordantanaliga100 ปีที่แล้ว +1

    Please do more projects with typescript, Sir

  • @prashanthsasidharan8083
    @prashanthsasidharan8083 ปีที่แล้ว

    Won't justify-content-between do the same as me-auto. Is there any difference in usage?

  • @UC_ganja
    @UC_ganja 2 ปีที่แล้ว

    Although I don't need it but it sure is good to know about it in case I need it so thanks for the info

  • @petalx3682
    @petalx3682 2 ปีที่แล้ว

    thanks man, very nice project +

  • @JanCharamza
    @JanCharamza ปีที่แล้ว

    Guys, how would you use fetch of the JSON file here instead of import? Tried to do so, but didn't figure it out with the combination of localStorage.

  • @patitorodri
    @patitorodri ปีที่แล้ว

    awesome man, thanks

  • @rahavareddy5510
    @rahavareddy5510 2 ปีที่แล้ว

    Do more videos on Reactjs and TS
    Thank you ❤️

  • @mahamednasr9269
    @mahamednasr9269 ปีที่แล้ว

    I would hope if you can tell us the extensions you use specially the ones you used in this vidoe

  • @sonamohialdin3376
    @sonamohialdin3376 ปีที่แล้ว

    Amazing tutorial

  • @digitalmachine0101
    @digitalmachine0101 2 หลายเดือนก่อน +1

    Good information

  • @smitagravat1063
    @smitagravat1063 ปีที่แล้ว

    I just want to say thank you ❤

  • @zipsoft
    @zipsoft 7 หลายเดือนก่อน

    Hi, Do you have a demo for place order page?

  • @paneurhythmie3728
    @paneurhythmie3728 ปีที่แล้ว +1

    Hi all, I implement the shopping cart, but I received the following error: const quantity = getItemQuantity(id); TypeError: getItemQuantity is not a function. Can someone help with that?