React Shopping Cart For Absolute Beginners [2022]

  Рет қаралды 151,251

Coding with Basir

Coding with Basir

Күн бұрын

🔥 Watch New Version Of This Course With React 18: • Build & Deploy React 1...
👉 Demo : small-react-cart.herokuapp.com
👉 Code : github.com/basir/react-course...
👉 Q/A. : codingwithbasir.com
Build A Simple Shopping Cart Using Only React For All Levels Web Developers
🔥 Get Complete Course for $14.90 (reg price $149) - LIMITED TIME:
basir.thinkific.com/courses/b...
TABLE OF CONTENT
00:00 Introduction
00:01:08 What You Will Build
00:03:18 Create Basic Components
00:08:53 Create Header
00:10:16 Add CSS
00:13:57 Create Main Component
00:18:06 Render Products
00:24:50 Use State Hook
00:32:10 Show Cart Items
00:35:26 Implement Remove From Cart
00:38:20 Make Cart Summary
00:42:29 Show Cart Badge
00:44:14 Add Checkout Button
00:45:32 Conclusion
YOU WILL LEARN
1. React: Components, Props, Events, Hooks
2. JavaScript Array Methods: filter, find, map, reduce
3. Extracting and Composing Components
4. Passing data and functions between components
🔥 Get Complete Course for $14.90 (reg price $149) - LIMITED TIME:
basir.thinkific.com/courses/b...
#React #Tutorial #Beginner
---
Follow me on:
👉 Website: codingwithbasir.com
👉 Twitter: / basrijd
👉 Linkedin: / basir-j
👉 Github: github.com/basir

Пікірлер: 306
@flpb.7727
@flpb.7727 3 жыл бұрын
This is one of the best tutorials I've ever seen. Usually you will search for "beginner tutorial on X" and then the guy does not explain the way a beginner can understand. You explain it step-by-step, calmly, with details, talking about the basic stuff a BEGGINER is looking for. Great content and teaching. Thanks!
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
hello there, thanks for your inspiring comment. I am working on NextJS and VueJS course now and will publish them soon.
@tanujaiswal5674
@tanujaiswal5674 3 жыл бұрын
Honestly, I have been juggling from one tutorial to another .Thank God I landed on your tutorial most simplest and best way to explain the functionalities
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
thanks for your interest and your are welcome.
@phil5293
@phil5293 2 жыл бұрын
Hands down. Best explained, simplest, most useful React tutorial I've ever seen.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
I'm glad you found it useful!
@soymanus
@soymanus 2 жыл бұрын
You are the best. I've been looking at various tutorials on how to create this but they are all super difficult to understand. You saved me. Thanks a lot.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You're very welcome! To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@mariapazjelvezherrera9236
@mariapazjelvezherrera9236 2 жыл бұрын
Thank you so much! You helped me a lot! I could add a cart to my restaurant project! And I shared your video with my classmates! They are all very grateful! Cheers from Chile 🇨🇱!
@AbdulRehman-ui3nj
@AbdulRehman-ui3nj Жыл бұрын
I would love to see your restaurent project
@mariapazjelvezherrera9236
@mariapazjelvezherrera9236 Жыл бұрын
@@AbdulRehman-ui3nj I recommend you to see it on a laptop or tablet because it is made for tablets!
@AbdulRehman-ui3nj
@AbdulRehman-ui3nj Жыл бұрын
@@mariapazjelvezherrera9236 Yes, But you have not sent me the link yet 😴
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest.
@Kaiz__
@Kaiz__ 2 жыл бұрын
Almost 2 years later this video is still really useful, thank you :)
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest. I created a new version of this course here: kzbin.info/www/bejne/eXXXgYCIat5jh7c here are the changes in new version: - use bootstrap instead CSS styles in index.css - use context API instead of Redux - use latest version of react, react-touter-dom, mongoose and other packages. - improving the code readability and stability in the new version.
@martinekjanko6547
@martinekjanko6547 2 жыл бұрын
I love it when people add a demo in the description, allows viewers to quickly check if what they're looking for is in the video without having to look through the whole thing. keep up the good work, worth a sub!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
I'm glad you liked it! Stay tuned for more content like this
@jordonmarchesano9219
@jordonmarchesano9219 11 ай бұрын
Awesome video! Thank you so much. I was searching for days on how to get this functionality properly on my app and this did the trick. Your awesome
@mad_rabbit27
@mad_rabbit27 3 жыл бұрын
I really learned a lot from this video, Thank you so much sir Basir!!! I am now subscribing you, hope to see more of your videos
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
hello there new course starts on tomorrow. build a self-order kiosk course using react context and materialui.
@paolasanchez9896
@paolasanchez9896 Жыл бұрын
Thank you very much, this tutorial was the best I could find; I appreciate the effort you put into your videos. Thank you for making this!
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Glad it helped! Please ask any coding questions here: codingwithbasir.com/questions/ask/
@josephuwagwu3069
@josephuwagwu3069 3 жыл бұрын
Thank you for this tutorial. great content!
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
You're very welcome!
@mamaandi1155
@mamaandi1155 3 жыл бұрын
best. Sir please we need more of these tutorials of react. Thanks!
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
More to come!
@alkeshsakre747
@alkeshsakre747 2 жыл бұрын
I am a beginner who just started learning to react I am grateful to you for providing step-by-step knowledge of how to use it.Thanks a lot
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
sounds awesome. To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@yodafr694
@yodafr694 2 жыл бұрын
As the greatest, you make it look simple! Thank you very much for this video and for your work, it was very helpful :D!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad it helped! for advanced version of this course take this one: please try my MERN course here: kzbin.info/www/bejne/ioOmdaZ4bs5mmKs
@raisudana
@raisudana 3 жыл бұрын
thank you so much for the lesson! GBU
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Glad it was helpful!
@julian_pp
@julian_pp 3 жыл бұрын
Thank you and great job Basir!!!
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Our pleasure!
@ben-cb5er
@ben-cb5er 3 жыл бұрын
Another great content.. Thank you for sharing your knowledge bro
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
I appreciate that
@chumaukeagu8228
@chumaukeagu8228 2 жыл бұрын
Thanks man, this is one of the best tutorial ever
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad you think so!
@korekomala5379
@korekomala5379 2 жыл бұрын
Omg!!!! Really I liked this tutorial. Sir, the way of explanation is awesome. I am able to understand clearly. Thank you!!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad it was helpful! Thanks for your support!
@romankravchenko6287
@romankravchenko6287 2 жыл бұрын
thank you! I was stuck on my project for days!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad I could help! To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@romankravchenko6287
@romankravchenko6287 2 жыл бұрын
@@CodingwithBasir Hey when I cloned your github, your code is breaking and I cant even view the project. I keep getting this. src\components\Basket.js Line 27:19: 'id' is not defined no-undef Line 27:37: 'id' is not defined no-undef Search for the keywords to learn more about each error. Any Idea why?
@rajdeeppurkayastha3287
@rajdeeppurkayastha3287 2 жыл бұрын
This is soo well explained. Thank you.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You're very welcome!
@engrb3696
@engrb3696 Жыл бұрын
Wow! what a wonderful tutorial. You're the best bro
@CodingwithBasir
@CodingwithBasir Жыл бұрын
thanks. Please ask any coding questions here: codingwithbasir.com/questions/ask/
@medenka
@medenka Жыл бұрын
for the first time enjoying coding. ty for the great video.
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@akashrizvi3072
@akashrizvi3072 Жыл бұрын
Best Explanation, simplest and every chapter of this playlist is clearly explained, Most beneficial React tutorial, I highly recommend this tutorial.
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest.
@CodewithAby
@CodewithAby 2 жыл бұрын
You are a very good teacher ....You covered a lot in a very short time. Thanks
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad it was helpful!
@tttwicetower8195
@tttwicetower8195 2 жыл бұрын
Bought all 6 Courses from you in this moment on udemy because i liked your step for step aproach. If you do more react projects can be very small ones, i would buy them all.
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@edu_sdorneles
@edu_sdorneles 2 жыл бұрын
Excellent explication! Thank you so much for this video! :D
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad it was helpful! To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@wasifraza4927
@wasifraza4927 3 жыл бұрын
I recently saw your channel, It's next level...Loved it.
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Thank you so much 😀
@oykunnazaydn1467
@oykunnazaydn1467 Жыл бұрын
thank you ! pretty clean and functional code
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest.
@bhansen316
@bhansen316 Жыл бұрын
Thank you! Very clear and concise directions.
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Glad it was helpful! Please watch my courses on Thinkific: basir.thinkific.com Use coupon APR2023 for 90% off.
@edwinalbeirocaiparamirez9854
@edwinalbeirocaiparamirez9854 3 жыл бұрын
it's great how you handle columns dividing products and items.
@lokindradangi
@lokindradangi 3 жыл бұрын
display: flex flex-wrap: wrap
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Glad you like it!
@yuliac.1436
@yuliac.1436 2 жыл бұрын
Great tutorial! Thank you so much !!!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You're very welcome!
@6977202865
@6977202865 2 жыл бұрын
man, your tutorial is super sick!!!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad you think so! watch this one too: kzbin.info/www/bejne/aZy8nHiMfr-BkLs
@victorassis4392
@victorassis4392 2 жыл бұрын
Excelent video! Thank you so much!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
you are welcome. Please watch my other courses here: codingwithbasir.com/courses
@jerrysibarani2709
@jerrysibarani2709 2 жыл бұрын
Thanks bro for the incredible tutorial :-)
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
My pleasure! Please watch my other courses here: codingwithbasir.com/courses
@Devdevo467
@Devdevo467 Жыл бұрын
The best tutorial. you are the best , thanks
@CodingwithBasir
@CodingwithBasir Жыл бұрын
You're welcome! check ts version of this course on my YT channel.
@sandercastillo9318
@sandercastillo9318 3 жыл бұрын
Thank you so much for this React tutorial I learned a lot but I noticed when I resize the window size of my browser to be responsive I noticed that Product(column1) and Basket (column2 ) section does not get responsive unlike from the Header section it does responsive...
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
to make it responsive you need to set width in flex. check this lesson for it: kzbin.info/www/bejne/ioOmdaZ4bs5mmKs&lc=UgwgKTISZnuAcdJB4vB4AaABAg
@petsmarket3675
@petsmarket3675 Жыл бұрын
Easy and perfect thanks Basir
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest.
@marcoscruz1845
@marcoscruz1845 9 ай бұрын
Muito Obrigado! ! ! sua video aula me salvo s2
@CodingwithBasir
@CodingwithBasir 9 ай бұрын
Sounds great Try the nextjs shopping cart. It is my last video on my channel
@mayarabezerra138
@mayarabezerra138 2 жыл бұрын
salvou demais, maravilhoso
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
you are welcome
@MegaMetallica4ever
@MegaMetallica4ever 4 ай бұрын
Excellent tutorial for beginners! One question though: How can I implement this in a cart component only, since my cart is a separate page and add to cart button is in the ProductPage? Thanks in advance.
@CodingwithBasir
@CodingwithBasir 4 ай бұрын
hello there, I implemented separate cart page version of this app in my next.js course. Please check my new course: Build Next 14 E-commerce Website Like Amazon In 4 Hour: kzbin.info/www/bejne/sIiop5V9mbqbiMk
@islammurat8853
@islammurat8853 Жыл бұрын
Thanks for this amazing lesson what if I want put basket in other page like a header ?
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest. Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@tornikesharia
@tornikesharia 3 жыл бұрын
Basir, you are a great man!
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
thanks.
@sohampurao
@sohampurao Жыл бұрын
This video helped me a lot 👍😊
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Thanks for your interest. What did you learn from this video? New version of this course using react 18 will be published next week.
@vijayshankarkattamuri5104
@vijayshankarkattamuri5104 9 сағат бұрын
hello sir, products are not showing on homescreen
@daniellanciotti8908
@daniellanciotti8908 Жыл бұрын
Amazing Tutorial !!... Thanxs🤗
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@ambesapaulos4323
@ambesapaulos4323 Жыл бұрын
You are doing a GREAT job please keep it up
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest.
@gilbertorogel81
@gilbertorogel81 2 жыл бұрын
Thank you very much Basir!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You are very welcome. To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@niteshsahu831
@niteshsahu831 3 жыл бұрын
Thank you so much for such awesome contents
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Glad you like them!
@avishekataur1710
@avishekataur1710 2 жыл бұрын
33:10 Oh! man you saved my assignment , very nice, Thanks
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, thanks for your interest. To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@mehdigeran
@mehdigeran 3 жыл бұрын
Excellent. Keep it up.
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Thank you, I will
@samahgad241
@samahgad241 2 жыл бұрын
thanks it was very helpful
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad it helped
@claytonvanderhaar3772
@claytonvanderhaar3772 2 жыл бұрын
Hi great work please can you help me how can I add more products below the 1st row
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, we use flex to display product divs. to have more products you need to make divs width smaller
@claytonvanderhaar3772
@claytonvanderhaar3772 2 жыл бұрын
@@CodingwithBasir Thanks man I need to implement the cart inside an existing app
@JahangirKhan-hz7ui
@JahangirKhan-hz7ui 2 жыл бұрын
Thank you for the tutorial means alot
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
It is possible to implement this using local storage too but that wouldn't be useful in real world projects!
@abuhanifashowrov2356
@abuhanifashowrov2356 2 жыл бұрын
Really Informative and helpful thanks
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest. Please ask any coding questions here: codingwithbasir.com/questions/ask/
@rythmdrum6
@rythmdrum6 Жыл бұрын
Excellent video, thanks so much! Any way you could implement Stripe Checkout to this?
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest. Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@fernandofernandez3649
@fernandofernandez3649 2 жыл бұрын
Thanks for this video.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You're welcome!
@Holaszyd1
@Holaszyd1 2 жыл бұрын
I don't know it just me but I have issues with the createItem.map used in the basket component. It not rendering at all.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
clone this repo and go to the small-shopping-cart folder and run npm install and npm start it works. then compare your code with it. To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@Holaszyd1
@Holaszyd1 2 жыл бұрын
@@CodingwithBasir thanks slots. I think the problem was I did not select any item into the cart basket. That why nothing displayed
@waleedsharif618
@waleedsharif618 2 жыл бұрын
Excellent ! Could you do this tutorial again but with redux toolkit?
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, it is already done here: codingwithbasir.com/p/free-mern-ecommerce
@mdraihanulislamtomal6064
@mdraihanulislamtomal6064 2 жыл бұрын
Is it possible to use functional component with out using hook?
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
no it is not.
@codescratch9434
@codescratch9434 3 жыл бұрын
This is amazing tutorial sir...i have one question , how to prevent add same product in the cart?
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
hello there you need to use an if condition in add method to check new item with items in the cart.
@codescratch9434
@codescratch9434 3 жыл бұрын
@@CodingwithBasir ok thanks
@camilomezu5008
@camilomezu5008 3 жыл бұрын
do you think it's necessary to implement redux for a simple e commerce or with props and hooks it's enough ?
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
with props and hooks it's enough for small project like this.
@besbn37
@besbn37 2 жыл бұрын
I love you THANKS YOU MUST KNOWWWW !!!!!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You're very welcome!
@ashrafsaad8666
@ashrafsaad8666 2 жыл бұрын
does anyone knows how to fix the unknown event error, react basically ignores the onAdd and the onRemove event from the basket
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Guess you resolved the issue yourself!
@sandeepnandanwar5240
@sandeepnandanwar5240 2 жыл бұрын
how can we disabled button when add card in the cart and enable it when remove card please help me
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there,
@sayalitandel5009
@sayalitandel5009 Жыл бұрын
Thank you!
@CodingwithBasir
@CodingwithBasir Жыл бұрын
You're welcome!
@lahoucine8211
@lahoucine8211 3 жыл бұрын
tbark lah aalik from agadir Morocco
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
thanks
@angelzacarias7865
@angelzacarias7865 2 жыл бұрын
Muchisimas gracias por tu aporte fue de mucha ayuda.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
thanks/
@IvoooOrtiz
@IvoooOrtiz 2 жыл бұрын
Hello Basir everything was going very well until this part 25:45, when I add the constant of useState I get this error: Invalid hook call error, I am creating the constant in a component unlike you but the constant products worked well for me, the component did I export as a constant also not as a function will that be? what can i do, thanks
@IvoooOrtiz
@IvoooOrtiz 2 жыл бұрын
I think I solved it by doing a function and there I call all the functions and I create the constants in the function that one all does not throw any error and everything works, is it fine then? I wanted to ask you how I do to enlarge everything because it looks very small In my project it is as in the center, and I also wanted to ask you how I can save the purchase data if I change the tab since I add it in the navbar to the cart thanks and sorry for the long message
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, sounds good. about "save the purchase data" you need to use localStorage
@sajjadpvazife1242
@sajjadpvazife1242 Жыл бұрын
عالی بود بصیر جان😍😍😍
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest.
@Cagui0623
@Cagui0623 2 жыл бұрын
does anyone know of a similar video using data and components across multiple pages? Seems to work differently when working with multiple pages.
@CodingwithBasir
@CodingwithBasir Жыл бұрын
Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@AdlejandroP
@AdlejandroP 2 жыл бұрын
great thank you!
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
You're welcome!
@codingbaba672
@codingbaba672 2 жыл бұрын
Amazing videos concepts are crystal clear but same thing can be done using UseReducer hook ....I want all to give it a try
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, thanks, for sure you could use UseReducer. watch this course. I have used UseReducer there to create a blogging system. kzbin.info/www/bejne/mnvGkGOYmJp4iqc&lc=UgyRIZKstyvR9pcFgHF4AaABAg
@edwinalbeirocaiparamirez9854
@edwinalbeirocaiparamirez9854 3 жыл бұрын
A question how can I add the payment api when you click on pay.
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
you need to take my mern course to connect to paypal here : kzbin.info/www/bejne/ioOmdaZ4bs5mmKs
@tttwicetower8195
@tttwicetower8195 Жыл бұрын
How can you make a history of baskets. Like first basket : items bought 2xMAcbook + Time/Date and second basket: items bought: 1xCar and 1x MAcbokk + Time/Date.
@CodingwithBasir
@CodingwithBasir Жыл бұрын
check this to get answer: codingwithbasir.com/how-can-you-make-a-history-of-baskets/
@sosanyaayonitemi2885
@sosanyaayonitemi2885 3 жыл бұрын
Very nice tutorial, please can we get a link to the pictures uesd for the site?
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
hello there, links are here: i.picsum.photos/id/180/2400/1600.jpg?hmac=Ig-CXcpNdmh51k3kXpNqNqcDYTwXCIaonYiBOnLXBb8 github.com/basir/react-course-final/blob/master/small-shopping-cart/src/data.js
@chilly1g
@chilly1g Жыл бұрын
Thank you very much :)
@CodingwithBasir
@CodingwithBasir Жыл бұрын
You're welcome! Please ask any coding questions here: codingwithbasir.com/questions/ask/
@successandyou7879
@successandyou7879 3 жыл бұрын
Hello can you please answer me im a beginner, and i faced a probem when i wanted to add more items to the data but they was displayed on the screen all on the same line even though i switched the display of the row from flex to grid i think i made a mistake if anyone can help to learn the trick and thank you an advance
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
hello there the best way to fix this issue is to compare your code with this style: github.com/basir/react-course-final/blob/master/small-shopping-cart/src/index.css also compare other files with the repo files.
@varsa1198
@varsa1198 2 жыл бұрын
width has to be set to 100% or less then put flex-wrap: wrap; on the container and if items reach end of screen they will break into a new row
@evgeniy4etok
@evgeniy4etok 3 жыл бұрын
thank you good man
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
You're welcome
@BreezySenpai_
@BreezySenpai_ 2 жыл бұрын
I keep getting an error stating "TypeError: Cannot read properties of undefined (reading 'map')" on the main component. Do you know why?
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, it means products is undefined. make sure you get the products from data.js correctly.
@komlanedmondapetogbo9057
@komlanedmondapetogbo9057 2 жыл бұрын
Hello, this is so awesome. Thanks this great job. However am sucked. In Basket, the cartItem doesn't have length property and when I put it, it makes everything desapear in my browser. I mean the browser is blank. Someone should help me out please Thanks PS: am a fresher to react
@CodingwithBasir
@CodingwithBasir Жыл бұрын
hello there, thanks for your interest. Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
@omarselim8902
@omarselim8902 2 жыл бұрын
I try to implement it with typesript but i get some difflicult issuses with it
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
I'll be implementing the same project with Typescript in the near future. Sign up here to get early access: www.codingwithbasir.com/courses
@l3aIIin23
@l3aIIin23 3 жыл бұрын
Great Video!
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Glad you enjoyed it
@pawandeepnain110
@pawandeepnain110 2 жыл бұрын
thnku sir for this great work
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
So nice of you. please watch this one too: kzbin.info/www/bejne/aZy8nHiMfr-BkLs
@HaiderAli-oi5fm
@HaiderAli-oi5fm 2 жыл бұрын
At 29:40 I don't get it. You are comparing cartItems id with product id and yet cartItems is empty. Please someone explain it to me.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Hello! We are comparing ids to find out if the product already exists in the cartItems or not! If it does then we just need to increment the qty, if not we need to add the whole product into cartItems. Hope that clarifies any confusion.
@sumitsinha995
@sumitsinha995 3 жыл бұрын
sir a get into trouble while trying to implement rating component the string template not working , product passed as the props i think both template literal and placholder ($) not working
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
you code seems right. make it like this to get work: github.com/basir/amazona/blob/master/frontend/src/components/Rating.js
@sumitsinha995
@sumitsinha995 3 жыл бұрын
@@CodingwithBasir I done sir text as props missing I figured it out thanks sir
@engineerx4487
@engineerx4487 3 жыл бұрын
okay am waiting for it .
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
it is for very beginners.
@karinarodriguez127
@karinarodriguez127 2 жыл бұрын
Super helpful :D
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Glad you think so!
@soroushghatran6196
@soroushghatran6196 3 жыл бұрын
دمت گرم بصیر جان
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
thanks
@abishek5496
@abishek5496 2 жыл бұрын
Instead of using html ,by using bootstrap ,the css styling will get reduced and more responsive app .Got my doubts cleared on hooks,props,array map method,thanks.
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
Yes, correct. but the focus on this video is on react without any framework. To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@venkatkadam544
@venkatkadam544 2 жыл бұрын
Hi Basir, for me getting error when passing the products data. can you check it once pls. Uncaught TypeError: Cannot read property 'image' of undefined
@venkatkadam544
@venkatkadam544 2 жыл бұрын
@Basir
@venkatkadam544
@venkatkadam544 2 жыл бұрын
@coding with Basir
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, it says product is undefined. clone my repo and run it locally. it works.then compare it with yours. link in the description.
@kacharaseth5725
@kacharaseth5725 3 жыл бұрын
great work sir
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
Keep watching
@birender_coding
@birender_coding 2 жыл бұрын
Which library functions are Used in this project
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, thanks for your interest. only react. To get this course as separated lessons with Q/A, Enroll for free here: codingwithbasir.com/p/free-mern-ecommerce
@Mintirafro
@Mintirafro 2 жыл бұрын
I am struggling a little because my projet uses class components instead of functional, but things are going smoother than I tought
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
I highly recommend to learn how to work with functional components as well. I'm glad things are going well
@mdraihanulislamtomal6064
@mdraihanulislamtomal6064 2 жыл бұрын
i can't publish on heroku. How do u did it. If its possible to create a small video it become helpful. Thanks
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
in this video I teach you how to upload on heroku. what error do you get there?
@mostafaahmed-fj8ji
@mostafaahmed-fj8ji 3 жыл бұрын
i have an error when i try to make counter cart items : "Error: Objects are not valid as a React child (found: object with keys {countcartitems}). If you meant to render a collection of children, use an array instead. "
@CodingwithBasir
@CodingwithBasir 3 жыл бұрын
you are rendering an array directly. please clone my repo and run it. then compare it with yours.
@camo4970
@camo4970 Жыл бұрын
const onAdd = (product) => { const exist = cart.find((x) => x.id === product.id); if (exist) { setCart( cart.map((x) => x.id === product.id ? { ...exist, qty: exist.qty + 1 } : x ) ); } else { setCart([...cart, { ...product, qty: 1 }]); } }; could you explain with more detail these lines of code please? -why did you put curly braces and the 3 dots before exist x.id === product.id ? { ...exist, qty: exist.qty + 1 } _why did you put brackets and the 3 dots before cart, and why did you put curly after that? setCart([...cart, { ...product, qty: 1 }]);
@CodingwithBasir
@CodingwithBasir Жыл бұрын
if (exist) { increase qty. by 1 for existing product } else { add new product to the cart items and set qty to 1 }
@snowhite414
@snowhite414 2 жыл бұрын
Hi. Can you help me make the data from data.js fetch from API? Thank you
@CodingwithBasir
@CodingwithBasir 2 жыл бұрын
hello there, for this purpose watch my MERN course here: kzbin.info/www/bejne/eXXXgYCIat5jh7c
@snowhite414
@snowhite414 2 жыл бұрын
@@CodingwithBasir Hi. Thanks for the quick response but I need your help regarding my assignment. I need to submit it tomorrow. It's just add and delete in react but the data is from my web API. I have that, I need to assign my fetch data to const variable data in data.js. Can you teach me how, please? Thank you.
@snowhite414
@snowhite414 2 жыл бұрын
@@CodingwithBasir Your project is the perfect example, I don't need to change it except the data.js, I need to fetch the data from my web API to data variable. const data = ? export default data;
@mariamsafarian4017
@mariamsafarian4017 Жыл бұрын
عالی هستید شما
@CodingwithBasir
@CodingwithBasir Жыл бұрын
thanks.
@ahmedmameche1759
@ahmedmameche1759 Жыл бұрын
when i refresh the page of cart items all products are removed and my cart is empty, any solution please?
@CodingwithBasir
@CodingwithBasir Жыл бұрын
check localStorage code to fix the issue. Please ask this question here: codingwithbasir.com/questions/ask/ I answer it on daily basis.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 133 М.
Vite Crash Course | Faster Alternative To CRA
16:24
Traversy Media
Рет қаралды 179 М.
YouTube's Biggest Mistake..
00:34
Stokes Twins
Рет қаралды 61 МЛН
I PEELED OFF THE CARDBOARD WATERMELON!#asmr
00:56
HAYATAKU はやたく
Рет қаралды 24 МЛН
Live Coding a Shopping Cart using React
31:32
Web Dev Cody
Рет қаралды 76 М.
ChatGPT’s Amazing New Model Feels Human (and it's Free)
25:02
Matt Wolfe
Рет қаралды 68 М.
Build & Deploy React 18 Shopping Cart For Beginners [2023]
52:26
Coding with Basir
Рет қаралды 19 М.
OpenAI SHOCKED Everyone! Voice, Vision, & Free?!
8:58
Theoretically Media
Рет қаралды 26 М.
INSANE OpenAI News: GPT-4o and your own AI partner
28:48
AI Search
Рет қаралды 92 М.
Redis Crash Course
27:31
Web Dev Simplified
Рет қаралды 586 М.
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
Вы поможете украсть ваш iPhone
0:56
Romancev768
Рет қаралды 404 М.
Airpods’un Gizli Özelliği mi var?
0:14
Safak Novruz
Рет қаралды 2,5 МЛН
What % of charge do you have on phone?🔋
0:11
Diana Belitskay
Рет қаралды 254 М.