React js Shopping Cart for beginner | Easy Way to Add to cart reactjs | react js project beginner 🔥🔥

  Рет қаралды 126,569

Code With Yd

Code With Yd

3 жыл бұрын

React js Shopping Cart for beginner | Easy Way to Add to cart reactjs | react js project beginner
_____________________________________________________
Buy me a coffee: www.buymeacoffee.com/codewithyd
React js frontend Project Tutorial Playlist :
• React js frontend Proj...
Telegram Channel Link :
t.me/Reactjs_Beginner_Project
Instagram Link :
/ codewithyd
Fb group :
/ 849818908701780
_____________________________________________________
This video is only education proposed
This video is not designed to harm anyone.
_____________________________________________________
_____________________________________________________
Track: Janji - Heroes Tonight (feat. Johnning) [NCS Release]
Music provided by NoCopyrightSounds.
Video: • Janji - Heroes Tonight...
Free Download / Stream: ncs.io/ht
______________________________________________________
Track: Unknown Brain - Why Do I? (ft. Bri Tolani) [NCS Release]
Music provided by NoCopyrightSounds.
Watch: • Unknown Brain - Why Do... ​
Free Download / Stream: ncs.io/WhyDoIYO
______________________________________________________
______________________________________________________
Track: Lost Sky - Dreams pt. II (feat. Sara Skinner) [NCS Release]
Music provided by NoCopyrightSounds.
Watch: • Lost Sky - Dreams pt. ... ​
Free Download / Stream: ncs.io/Dreams2YO
______________________________________________________
#react #codewithyd

Пікірлер: 165
@kaustavbasu8250
@kaustavbasu8250 2 жыл бұрын
"addItem is not a function" -that is a error when addItem added to a button please help me sir
@codewithyd
@codewithyd 2 жыл бұрын
"additem is not a function solution" Import CartProvider from react use cart And warp in app component
@vincentnierat2141
@vincentnierat2141 2 жыл бұрын
@@codewithyd not working for me when i wrap App component
@user-bz9md5sk2k
@user-bz9md5sk2k 2 жыл бұрын
you should put useCart attributes in curly bracets. const { addItem } = useCart();
@codewithyd
@codewithyd 2 жыл бұрын
Using curly brackets solved your error ?
@kaustavbasu8250
@kaustavbasu8250 2 жыл бұрын
@@codewithyd yes
@soulking6982
@soulking6982 2 жыл бұрын
I looking for this for long time this is awesome brother. May God bless U
@THEONE-qd5zw
@THEONE-qd5zw 8 ай бұрын
You are really great😢❤ I create the cart section( which is struggle for me since 3 days) just by seeing your video . Thank you so much❤
@YogeshKumar-jz6cx
@YogeshKumar-jz6cx 3 жыл бұрын
this is the video I've been waiting for...thank you
@codewithyd
@codewithyd 3 жыл бұрын
Thanks bro 👍👍👍
@jamesr2408
@jamesr2408 20 күн бұрын
Except for the adding of images -- tricky -- works like without a hitch. Thanks. Now I need to integrate routes and Stripe Elements. Thank you for the help.
@jamesr2408
@jamesr2408 2 күн бұрын
Routes and Stripe Elements integrated, working on post-payment Zip and auto-download to client.
@NANAPATY
@NANAPATY 2 жыл бұрын
Thanks a lot, this tutorial helped me with my project, very well done. Greetings from Colombia 😀
@sourabhsdawari1810
@sourabhsdawari1810 2 жыл бұрын
need logic to wrap all this in array and making object like orderItems so after placing order i can pass it to database and admin panel orderslist in my project... can you help?
@okworjoshua8157
@okworjoshua8157 7 ай бұрын
Thank you so much for this My add to cart is now working
@nishanthuthappa5890
@nishanthuthappa5890 2 жыл бұрын
Thank you.. It helped me a lot in my project 🙏🏻
@anonymousgladiator5541
@anonymousgladiator5541 2 жыл бұрын
please share source code dude?
@sobirovsam2331
@sobirovsam2331 2 жыл бұрын
please
@rorocyr6450
@rorocyr6450 Жыл бұрын
At 17:33 , when i use that map array method in a similar way and i click on the "add to cart" button on any one of my product cards, it visually renders every product in my data set to the cart, even though the cart recognizes that i've only added one item. Some help with this asap would be greatly greatly appreciated!
@KLLYFLE
@KLLYFLE Жыл бұрын
Encontro solución ?
@alexanvonner1729
@alexanvonner1729 Жыл бұрын
thank you for your video bro react-use-cart is very fun and easy
@mojojojogaming5685
@mojojojogaming5685 Жыл бұрын
I complete your thousand likes 👍... Because you fix my bugs with your code... Thankyou
@codewithyd
@codewithyd Жыл бұрын
Welcome to code with yd 🤗
@ZiaCodes
@ZiaCodes Жыл бұрын
does it work with sanity _id? because it is giving me error that please provide an id. sanity has _id so I think that's why? any solutions?
@buikhanhi2k
@buikhanhi2k 2 жыл бұрын
I am from Vietnam. Thank you bro very much
@nitibhardwaj5945
@nitibhardwaj5945 4 күн бұрын
The data fetch from API or create own data
@wesleyalves127
@wesleyalves127 Жыл бұрын
Amazing Bro thanks 🙏🏻
@mohamedyossefhemdankhledy905
@mohamedyossefhemdankhledy905 11 ай бұрын
bro please help me . i have erorr and i donot solve it (React Hook "useCart" is called in function "itemcard" that is neither a React function component)
@rahulghoshal3044
@rahulghoshal3044 Жыл бұрын
bro when i remove the ()= from on click my broswer removes all the content from it simply white screen plz give any alternative of add item
@sairamya1544
@sairamya1544 2 жыл бұрын
May I know where should I find the source code for this? Plz
@saurabhgaur9270
@saurabhgaur9270 2 жыл бұрын
Bhai Esme vedio ka intjaar tha yr thank you sir
@codewithyd
@codewithyd 2 жыл бұрын
Thanks for your support thanks 👍👍
@phunobi888
@phunobi888 2 жыл бұрын
thank you ! You can full project
@codewithyd
@codewithyd 2 жыл бұрын
Welcome bro
@aniketgupta1577
@aniketgupta1577 Жыл бұрын
plz make sure while creating u should not use any idiotic musics coz we are using logic and thinking regarding project
@Drapeo
@Drapeo 2 жыл бұрын
Thank you very much !
@haleyhe1332
@haleyhe1332 Жыл бұрын
Hello, I have followed your code exactly the same, but the cart component is endless counting and my browser gets crashed. May you have any solution to that? If not, that would be appreciated if anywhere can share your source code to let me cross-check! Thank you!
@codewithyd
@codewithyd Жыл бұрын
I'm sorry but source is not available.
@timeguru1916
@timeguru1916 2 жыл бұрын
very nice video bro thanks for this video ❤️
@codewithyd
@codewithyd 2 жыл бұрын
Thank you for your support 👍👍👍👌👌👌
@mykesoftware3044
@mykesoftware3044 2 жыл бұрын
Can be used with react native?
@juliocesarminharotina2117
@juliocesarminharotina2117 2 жыл бұрын
how can I to include localstorage?
@kishan-py3lv
@kishan-py3lv Жыл бұрын
i am also facing "additem is not a function" error and i have tried every solution but error is still showing. plz help!
@andr_hot
@andr_hot 2 жыл бұрын
Hello, I wanted to ask how to implement, so that, for example, an orange would receive a discount on the third addition
@thetechdev109
@thetechdev109 Жыл бұрын
Use if statement. For example if the price of an orange is $2, 3 oranges will be $6. So the if statement will be like this: If(item.price ==6){ //Your discount code }
@alexalex3055
@alexalex3055 Жыл бұрын
Thank you so much for this awesome tutorial but my Price tag is not showning...please give me solution
@dungtien9599
@dungtien9599 2 жыл бұрын
Thank you so much.
@YogeshKumar-jz6cx
@YogeshKumar-jz6cx 3 жыл бұрын
sir please make a video on react redux 🙌🙌🙌
@farjanaakter7089
@farjanaakter7089 2 жыл бұрын
Error: You must provide an `id` for items - Can anyone help me with this error?
@cakewalk7469
@cakewalk7469 29 күн бұрын
Iam getting the error "You must pass a `price` for new items" how can i solve this error?
@valentina-buoro
@valentina-buoro Жыл бұрын
Awesome tutorial!
@codewithyd
@codewithyd Жыл бұрын
Thanks
@abraralrawi7021
@abraralrawi7021 2 жыл бұрын
TypeError: Cannot read properties of undefined (reading 'id') ,bro can u tell me the solution of this error when click add to cart ???
@vaswna14
@vaswna14 Жыл бұрын
Did you write in your data id ?
@sundarp3959
@sundarp3959 28 күн бұрын
If we click the add to card the product is added to the another one page here added in same page so this is a major disadvantage
@vinunikhare9334
@vinunikhare9334 2 жыл бұрын
please implement stripe payment gateway in this Project
@ankitathakur8739
@ankitathakur8739 9 ай бұрын
Thnq so much 🎉🎉
@arpithagowda7512
@arpithagowda7512 2 жыл бұрын
"addItem is not a function" -that is a error when addItem added to a button please help me sir
@alfiyashaikh6054
@alfiyashaikh6054 2 ай бұрын
the Total Price is showing NaN for the Cart Total ?
@raishumsingh8009
@raishumsingh8009 25 күн бұрын
How do ypu connect to a data bases sql to stor this informatin
@tanjidmahamud4610
@tanjidmahamud4610 2 жыл бұрын
can I get source code of this tutorial?
@abcd4684
@abcd4684 28 күн бұрын
Superb Bro ❤
@vishnukarthikmadupuri37
@vishnukarthikmadupuri37 2 жыл бұрын
Thank you so much bro
@codewithyd
@codewithyd 2 жыл бұрын
Thanks bro 👍
@filipjovic6815
@filipjovic6815 Жыл бұрын
where dose item.quantity comes from, when u dont use it first time?
@rahulpandat1205
@rahulpandat1205 3 жыл бұрын
Thanks a lot bot for this
@codewithyd
@codewithyd 3 жыл бұрын
Thanks for your great support 👍👍
@chanduninethmini980
@chanduninethmini980 2 жыл бұрын
thank a lot.. very useful video
@codewithyd
@codewithyd 2 жыл бұрын
Thanks for your support 👍
@shahmali3529
@shahmali3529 2 жыл бұрын
Thanks this project
@codewithyd
@codewithyd 2 жыл бұрын
Welcome 🤗
@sangeetham3859
@sangeetham3859 2 жыл бұрын
I want cart part in another page when click on add to cart. What should I do?
@codewithyd
@codewithyd 2 жыл бұрын
You can use react router
@rajutamang392
@rajutamang392 Жыл бұрын
very fast hard to catch and in spite of music little bit explanation would be greater
@unknownguy2905
@unknownguy2905 Жыл бұрын
Hi i just finished this video, but whats the point of using already written functions like add, remove item ? I mean we wont learn anything like that, might be wrong, idk
@codewithyd
@codewithyd Жыл бұрын
I know everything but it makes our work easy that's why I am using this library
@unknownguy2905
@unknownguy2905 Жыл бұрын
@@codewithyd Wow thanks for a fast respond, didnt mean u will write anything, ive been looking for some cart related videos and out of all of them your is the best, even written like this on a simpler way, saw some written in typescript but havent seen them yet cuz i dont know typescript, any suggestions from you regarding my learning path etc? always glad to hear what pros have to say
@codewithyd
@codewithyd Жыл бұрын
You have to keep working on different different projects to advance your studies and thank you for liking my video 🥰
@unknownguy2905
@unknownguy2905 Жыл бұрын
@@codewithyd Thank you too :)
@kinu5946
@kinu5946 Жыл бұрын
how can i separate into 2 sites?
@user-hw6po4np9u
@user-hw6po4np9u Жыл бұрын
Thank you very much, very useful video, very helps me with my project
@codewithyd
@codewithyd Жыл бұрын
Welcome to CodeWithYd bro 🤗
@Back-up-all
@Back-up-all 2 жыл бұрын
very interesting
@reshadrzayev5744
@reshadrzayev5744 2 жыл бұрын
It is very senseless that u must pass price title as only 'price' in your data or api. I have data with 'regular_price' title and react-use-cart returnes "You must pass a `price` for new items" error.
@martinmtandi335
@martinmtandi335 2 жыл бұрын
facing the same issue, let me try that fix
@user-wi5tx7gy7u
@user-wi5tx7gy7u Жыл бұрын
How I find nexf video about Buy Now?
@TechEtti
@TechEtti 2 жыл бұрын
Buttons are getting repeat in every card
@user-mn2po8ns2z
@user-mn2po8ns2z 2 жыл бұрын
can i use the use cart with redux? Is it possible?
@codewithyd
@codewithyd 2 жыл бұрын
Yes
@barankurt4316
@barankurt4316 Жыл бұрын
How to cards filter dropdown or select box.?
@codewithyd
@codewithyd Жыл бұрын
Check my react playlist filter video is also available.
@sandeepkumar-rq2mk
@sandeepkumar-rq2mk Жыл бұрын
Item is not adding in the cart even I clicked on add to cart the cart is empty
@tamilbtslove482
@tamilbtslove482 Жыл бұрын
Great 😃👍
@codewithyd
@codewithyd Жыл бұрын
Thanks 🤗
@nishanthuthappa5890
@nishanthuthappa5890 2 жыл бұрын
Can I wrap Cardprovider inside index. Js?
@the90sGamerofficial
@the90sGamerofficial 2 жыл бұрын
Can you please share the source code please??
@quanghuynguyen8679
@quanghuynguyen8679 2 жыл бұрын
i have a question: does this library support react class component ?
@quanghuynguyen8679
@quanghuynguyen8679 2 жыл бұрын
@@codewithyd hey bro, i try "const { addItem } = useCart();" but it not support. Can you help me ?
@quanghuynguyen8679
@quanghuynguyen8679 2 жыл бұрын
@@codewithyd i'm using class components
@codewithyd
@codewithyd 2 жыл бұрын
Sorry supported only function components
@quanghuynguyen8679
@quanghuynguyen8679 2 жыл бұрын
@@codewithyd thanks bro, i have just found solution
@codewithyd
@codewithyd 2 жыл бұрын
Thanks bro
@ikramf6501
@ikramf6501 Жыл бұрын
Thank you
@codewithyd
@codewithyd Жыл бұрын
Welcome to code with yd ☺️
@keoptagaming7495
@keoptagaming7495 2 жыл бұрын
Can I know your VS Code Theme?
@rabi11007
@rabi11007 2 жыл бұрын
everything was ok but the background music !! It destructs .....
@sagarmoriya9773
@sagarmoriya9773 2 жыл бұрын
image is not displaying in cart
@HassanAli-hx2ci
@HassanAli-hx2ci Жыл бұрын
How to add images??
@wolfasad9872
@wolfasad9872 Жыл бұрын
you should upload this to any git
@pavan3866
@pavan3866 2 жыл бұрын
Module not found img
@user-wi5tx7gy7u
@user-wi5tx7gy7u Жыл бұрын
Buy Now how to do?
@vivekmodi3165
@vivekmodi3165 2 жыл бұрын
Why you have added background music?
@cholakovit
@cholakovit 2 жыл бұрын
I got this error: Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
@bakapvn
@bakapvn 2 жыл бұрын
I think you have to put the state that will update inside the array parameter of useEffect hook
@hemangkoshiyar2586
@hemangkoshiyar2586 2 жыл бұрын
I think you forgot to add ()=> inside the onClick event, recheck that
@user-wi5tx7gy7u
@user-wi5tx7gy7u Жыл бұрын
Next video where?
@crazyaji3130
@crazyaji3130 2 жыл бұрын
This project code link please send me
@palcherin
@palcherin Ай бұрын
I never understand why you have a code tutorial with no source code
@pavan3866
@pavan3866 2 жыл бұрын
Sources code kaha he
@siddharthvaishnav
@siddharthvaishnav 2 жыл бұрын
bhai addItem is not defined aa rha hai . Cart.js file bhi
@125siddheshmhatre6
@125siddheshmhatre6 2 жыл бұрын
Bhai usne function pehe se hi define krke rakha he islye
@codewithyd
@codewithyd 2 жыл бұрын
"additem is not a function solution" Import CartProvider from react use cart And warp in app component
@shekhardhruv2939
@shekhardhruv2939 2 жыл бұрын
pls send your source code
@amitpandharikar2377
@amitpandharikar2377 2 жыл бұрын
when can we get source code
@amitpandharikar2377
@amitpandharikar2377 2 жыл бұрын
pls don't give like tell me where do i get source code
@125siddheshmhatre6
@125siddheshmhatre6 2 жыл бұрын
Did yo get source code?
@JunaidKhan-zh1wn
@JunaidKhan-zh1wn Жыл бұрын
sir is source code available?
@38nazmulnahid55
@38nazmulnahid55 2 жыл бұрын
can we get source code
@RHales-vu2ie
@RHales-vu2ie 2 жыл бұрын
Name of song?
@codewithyd
@codewithyd 2 жыл бұрын
Janji - Heroes Tonight and, Unknown Brain - Why Do
@njyothi4949
@njyothi4949 2 жыл бұрын
I like this video but cartTotal is not working for me.
@codewithyd
@codewithyd 2 жыл бұрын
Check your project code 👍
@njyothi4949
@njyothi4949 2 жыл бұрын
@@codewithyd Yes i have check the code but still facing same issue,could you please send the source code.
@codewithyd
@codewithyd 2 жыл бұрын
Join my whatsapp group and send your code thank you for your comments
@125siddheshmhatre6
@125siddheshmhatre6 2 жыл бұрын
Do you have code ?
@TechEtti
@TechEtti 2 жыл бұрын
source code plz
@anonymousgladiator5541
@anonymousgladiator5541 2 жыл бұрын
Please share source code?
@ashokchhetri8513
@ashokchhetri8513 2 жыл бұрын
Why not add code?
@roshangeorge97
@roshangeorge97 Жыл бұрын
Source code bro??
@jeevankumawat_7220
@jeevankumawat_7220 2 жыл бұрын
add item is not a function help me sir
@codewithyd
@codewithyd 2 жыл бұрын
"additem is not a function solution" Import CartProvider from react use cart And warp in app component
@jeevankumawat_7220
@jeevankumawat_7220 2 жыл бұрын
@@codewithyd nhi ho rha na ye to phle hi krwa diya tha
@shekhardhruv2939
@shekhardhruv2939 2 жыл бұрын
@@jeevankumawat_7220 pls send your source code
@newaz7591
@newaz7591 2 жыл бұрын
github link please
@HassanAli-hx2ci
@HassanAli-hx2ci Жыл бұрын
Please give the code
@anbubala3237
@anbubala3237 2 жыл бұрын
Source code
@konno_donnoi7851
@konno_donnoi7851 2 жыл бұрын
the background song was totally unnecessary!
@codewithyd
@codewithyd 2 жыл бұрын
Sorry for bg voice
@user-fr2ti5jv7b
@user-fr2ti5jv7b 9 ай бұрын
addItem isnot function pls help
@himanshibante9855
@himanshibante9855 2 жыл бұрын
How can we redirect that add to cart page on next page?
@codewithyd
@codewithyd 2 жыл бұрын
You can use react router
@bilalumer763
@bilalumer763 Жыл бұрын
Use to redux or same as use same you can create new page
@bilalumer763
@bilalumer763 Жыл бұрын
Or create routing wrap inside of NavLink tag
Live Coding a Shopping Cart using React
31:32
Web Dev Cody
Рет қаралды 76 М.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 34 МЛН
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 10 МЛН
小路飞第二集:小路飞很听话#海贼王  #路飞
00:48
路飞与唐舞桐
Рет қаралды 19 МЛН
Stupid man 👨😂
00:20
Nadir Show
Рет қаралды 25 МЛН
NEW GPT-4o: My Mind is Blown.
6:28
Joshua Chang
Рет қаралды 52 М.
React Shopping Cart in 2022 || Using Hooks and React Router
50:42
Code&Coding
Рет қаралды 119 М.
ASMR Programming - Weather App With Javascript - No Talking
20:30
AsmrProg
Рет қаралды 2,6 МЛН
OpenAI "SHOCKED" Everyone! Voice, Vision, & Free?!
8:58
Theoretically Media
Рет қаралды 22 М.
OpenAI’s GPT-4o: The Best AI Is Now Free!
9:14
Two Minute Papers
Рет қаралды 22 М.
GPT-4o - Full Breakdown + Bonus Details
18:43
AI Explained
Рет қаралды 148 М.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 34 МЛН