Тёмный

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

Code With Yd
Подписаться 4,9 тыс.
Просмотров 138 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 170   
@kaustavbasu8250
@kaustavbasu8250 3 года назад
"addItem is not a function" -that is a error when addItem added to a button please help me sir
@codewithyd
@codewithyd 3 года назад
"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
@مریمصفریانارکولی
@مریمصفریانارکولی 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
@THEONE-qd5zw
@THEONE-qd5zw Год назад
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❤
@aniketgupta1577
@aniketgupta1577 Год назад
plz make sure while creating u should not use any idiotic musics coz we are using logic and thinking regarding project
@soulking6982
@soulking6982 2 года назад
I looking for this for long time this is awesome brother. May God bless U
@rajutamang392
@rajutamang392 2 года назад
very fast hard to catch and in spite of music little bit explanation would be greater
@YogeshKumar-jz6cx
@YogeshKumar-jz6cx 3 года назад
this is the video I've been waiting for...thank you
@codewithyd
@codewithyd 3 года назад
Thanks bro 👍👍👍
@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 11 месяцев назад
Thank you so much for this My add to cart is now working
@cakewalk7469
@cakewalk7469 5 месяцев назад
Iam getting the error "You must pass a `price` for new items" how can i solve this error?
@YogeshKumar-jz6cx
@YogeshKumar-jz6cx 3 года назад
sir please make a video on react redux 🙌🙌🙌
@rahulghoshal3044
@rahulghoshal3044 2 года назад
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
@haleyhe1332
@haleyhe1332 2 года назад
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 2 года назад
I'm sorry but source is not available.
@rorocyr6450
@rorocyr6450 2 года назад
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 2 года назад
thank you for your video bro react-use-cart is very fun and easy
@sairamya1544
@sairamya1544 3 года назад
May I know where should I find the source code for this? Plz
@raishumsingh8009
@raishumsingh8009 5 месяцев назад
How do ypu connect to a data bases sql to stor this informatin
@filipjovic6815
@filipjovic6815 Год назад
where dose item.quantity comes from, when u dont use it first time?
@Vickyboy7
@Vickyboy7 3 месяца назад
how u r import image its confuse
@wesleyalves127
@wesleyalves127 Год назад
Amazing Bro thanks 🙏🏻
@rabi11007
@rabi11007 2 года назад
everything was ok but the background music !! It destructs .....
@nishanthuthappa5890
@nishanthuthappa5890 2 года назад
Can I wrap Cardprovider inside index. Js?
@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!
@juelmapereira4277
@juelmapereira4277 Месяц назад
{addItem}, you must put between curly brackets
@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 }
@huynq24
@huynq24 3 года назад
i have a question: does this library support react class component ?
@huynq24
@huynq24 3 года назад
@@codewithyd hey bro, i try "const { addItem } = useCart();" but it not support. Can you help me ?
@huynq24
@huynq24 3 года назад
@@codewithyd i'm using class components
@codewithyd
@codewithyd 3 года назад
Sorry supported only function components
@huynq24
@huynq24 3 года назад
@@codewithyd thanks bro, i have just found solution
@codewithyd
@codewithyd 3 года назад
Thanks bro
@МадиярЮлдашев-п9д
How I find nexf video about Buy Now?
@juelmapereira4277
@juelmapereira4277 Месяц назад
Very good
@МадиярЮлдашев-п9д
Buy Now how to do?
@abcd4684
@abcd4684 5 месяцев назад
Superb Bro ❤
@rahulpandat1205
@rahulpandat1205 3 года назад
Thanks a lot bot for this
@codewithyd
@codewithyd 3 года назад
Thanks for your great support 👍👍
@mykesoftware3044
@mykesoftware3044 3 года назад
Can be used with react native?
@pavan3866
@pavan3866 2 года назад
Module not found img
@АлексейМелентьев-ч3в
can i use the use cart with redux? Is it possible?
@codewithyd
@codewithyd 3 года назад
Yes
@keoptagaming7495
@keoptagaming7495 2 года назад
Can I know your VS Code Theme?
@38nazmulnahid55
@38nazmulnahid55 2 года назад
can we get source code
@roshangeorge97
@roshangeorge97 2 года назад
Source code bro??
@HassanAli-hx2ci
@HassanAli-hx2ci 2 года назад
Please give the code
@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
@farjanaakter7089
@farjanaakter7089 2 года назад
Error: You must provide an `id` for items - Can anyone help me with this error?
@NANAPATY
@NANAPATY 2 года назад
Thanks a lot, this tutorial helped me with my project, very well done. Greetings from Colombia 😀
@tanjidmahamud4610
@tanjidmahamud4610 3 года назад
can I get source code of this tutorial?
@sandeepkumar-rq2mk
@sandeepkumar-rq2mk Год назад
Item is not adding in the cart even I clicked on add to cart the cart is empty
@juelmapereira4277
@juelmapereira4277 Месяц назад
same for me
@sundarp3959
@sundarp3959 5 месяцев назад
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
@TechEtti
@TechEtti 3 года назад
Buttons are getting repeat in every card
@jamesr2408
@jamesr2408 5 месяцев назад
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 4 месяца назад
Routes and Stripe Elements integrated, working on post-payment Zip and auto-download to client.
@the90sGamerofficial
@the90sGamerofficial 2 года назад
Can you please share the source code please??
@palcherin
@palcherin 6 месяцев назад
I never understand why you have a code tutorial with no source code
@alfiyashaikh6054
@alfiyashaikh6054 7 месяцев назад
the Total Price is showing NaN for the Cart Total ?
@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
@juliocesarminharotina2117
@juliocesarminharotina2117 2 года назад
how can I to include localstorage?
@Back-up-all
@Back-up-all 2 года назад
very interesting
@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 ?
@mojojojogaming5685
@mojojojogaming5685 2 года назад
I complete your thousand likes 👍... Because you fix my bugs with your code... Thankyou
@codewithyd
@codewithyd 2 года назад
Welcome to code with yd 🤗
@buikhanhi2k
@buikhanhi2k 2 года назад
I am from Vietnam. Thank you bro very much
@Drapeo
@Drapeo 2 года назад
Thank you very much !
@phunobi888
@phunobi888 3 года назад
thank you ! You can full project
@codewithyd
@codewithyd 3 года назад
Welcome bro
@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?
@unknownguy2905
@unknownguy2905 2 года назад
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 2 года назад
I know everything but it makes our work easy that's why I am using this library
@unknownguy2905
@unknownguy2905 2 года назад
@@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 2 года назад
You have to keep working on different different projects to advance your studies and thank you for liking my video 🥰
@unknownguy2905
@unknownguy2905 2 года назад
@@codewithyd Thank you too :)
@konno_donnoi7851
@konno_donnoi7851 2 года назад
the background song was totally unnecessary!
@codewithyd
@codewithyd 2 года назад
Sorry for bg voice
@TechEtti
@TechEtti 3 года назад
source code plz
@barankurt4316
@barankurt4316 2 года назад
How to cards filter dropdown or select box.?
@codewithyd
@codewithyd 2 года назад
Check my react playlist filter video is also available.
@МадиярЮлдашев-п9д
Next video where?
@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
@anonymousgladiator5541
@anonymousgladiator5541 2 года назад
Please share source code?
@mohamedyossefhemdankhledy905
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)
@tamilbtslove482
@tamilbtslove482 Год назад
Great 😃👍
@codewithyd
@codewithyd Год назад
Thanks 🤗
@timeguru1916
@timeguru1916 3 года назад
very nice video bro thanks for this video ❤️
@codewithyd
@codewithyd 3 года назад
Thank you for your support 👍👍👍👌👌👌
@alexalex3055
@alexalex3055 Год назад
Thank you so much for this awesome tutorial but my Price tag is not showning...please give me solution
@shahmali3529
@shahmali3529 2 года назад
Thanks this project
@codewithyd
@codewithyd 2 года назад
Welcome 🤗
@arpithagowda7512
@arpithagowda7512 2 года назад
"addItem is not a function" -that is a error when addItem added to a button please help me sir
@RHales-vu2ie
@RHales-vu2ie 2 года назад
Name of song?
@codewithyd
@codewithyd 2 года назад
Janji - Heroes Tonight and, Unknown Brain - Why Do
@ikramf6501
@ikramf6501 2 года назад
Thank you
@codewithyd
@codewithyd 2 года назад
Welcome to code with yd ☺️
@nitibhardwaj5945
@nitibhardwaj5945 4 месяца назад
The data fetch from API or create own data
@saurabhgaur9270
@saurabhgaur9270 3 года назад
Bhai Esme vedio ka intjaar tha yr thank you sir
@codewithyd
@codewithyd 3 года назад
Thanks for your support thanks 👍👍
@njyothi4949
@njyothi4949 3 года назад
I like this video but cartTotal is not working for me.
@codewithyd
@codewithyd 3 года назад
Check your project code 👍
@njyothi4949
@njyothi4949 3 года назад
@@codewithyd Yes i have check the code but still facing same issue,could you please send the source code.
@codewithyd
@codewithyd 3 года назад
Join my whatsapp group and send your code thank you for your comments
@125siddheshmhatre6
@125siddheshmhatre6 3 года назад
Do you have code ?
@vishnukarthikmadupuri37
@vishnukarthikmadupuri37 3 года назад
Thank you so much bro
@codewithyd
@codewithyd 3 года назад
Thanks bro 👍
@vivekmodi3165
@vivekmodi3165 2 года назад
Why you have added background music?
@valentina-buoro
@valentina-buoro 2 года назад
Awesome tutorial!
@codewithyd
@codewithyd 2 года назад
Thanks
@crazyaji3130
@crazyaji3130 2 года назад
This project code link please send me
@wolfasad9872
@wolfasad9872 Год назад
you should upload this to any git
@kinu5946
@kinu5946 Год назад
how can i separate into 2 sites?
@sagarmoriya9773
@sagarmoriya9773 2 года назад
image is not displaying in cart
@amitpandharikar2377
@amitpandharikar2377 3 года назад
when can we get source code
@amitpandharikar2377
@amitpandharikar2377 3 года назад
pls don't give like tell me where do i get source code
@125siddheshmhatre6
@125siddheshmhatre6 3 года назад
Did yo get source code?
@JunaidKhan-zh1wn
@JunaidKhan-zh1wn 2 года назад
sir is source code available?
@newaz7591
@newaz7591 2 года назад
github link please
@HassanAli-hx2ci
@HassanAli-hx2ci 2 года назад
How to add images??
@ankitathakur8739
@ankitathakur8739 Год назад
Thnq so much 🎉🎉
@ashokchhetri8513
@ashokchhetri8513 2 года назад
Why not add code?
@vinunikhare9334
@vinunikhare9334 3 года назад
please implement stripe payment gateway in this Project
@sangeetham3859
@sangeetham3859 3 года назад
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
@anbubala3237
@anbubala3237 3 года назад
Source code
@pavan3866
@pavan3866 2 года назад
Sources code kaha he
@dungtien9599
@dungtien9599 3 года назад
Thank you so much.
@siddharthvaishnav
@siddharthvaishnav 3 года назад
bhai addItem is not defined aa rha hai . Cart.js file bhi
@125siddheshmhatre6
@125siddheshmhatre6 3 года назад
Bhai usne function pehe se hi define krke rakha he islye
@codewithyd
@codewithyd 3 года назад
"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
@chanduninethmini980
@chanduninethmini980 3 года назад
thank a lot.. very useful video
@codewithyd
@codewithyd 3 года назад
Thanks for your support 👍
@jeevankumawat_7220
@jeevankumawat_7220 3 года назад
add item is not a function help me sir
@codewithyd
@codewithyd 3 года назад
"additem is not a function solution" Import CartProvider from react use cart And warp in app component
@jeevankumawat_7220
@jeevankumawat_7220 3 года назад
@@codewithyd nhi ho rha na ye to phle hi krwa diya tha
@shekhardhruv2939
@shekhardhruv2939 2 года назад
@@jeevankumawat_7220 pls send your source code
@video_contentuz
@video_contentuz Год назад
addItem isnot function pls help
@ЖазгулКаныбекова-б5с
Thank you very much, very useful video, very helps me with my project
@codewithyd
@codewithyd 2 года назад
Welcome to CodeWithYd bro 🤗
@cholakovit
@cholakovit 3 года назад
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 3 года назад
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
Далее
ТАРАКАН
00:38
Просмотров 370 тыс.
Live Coding a Shopping Cart using React
31:32
Просмотров 77 тыс.
State Managers Are Making Your Code Worse In React
13:33
Shopping Cart | React.js Project with explanation
19:15
How to Make Responsive Navbar in React JS
20:31
Просмотров 4,2 тыс.
Shopping Cart In React Js For Newbies
31:52
Просмотров 25 тыс.