Custom hooks in react | currency Project

  Рет қаралды 14,513

Hitesh Choudhary

Hitesh Choudhary

8 ай бұрын

Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
All the learning resources such as code files, documentations, articles and community discussions are available on our website:
chaicode.com/
You can find our discord link, github link etc on the above website.
Twitter/X link: x.com/hiteshdotcom
Discord link: hitesh.ai/discord
Learn React with 10 projects: • Let's learn react from...
Learn Docker: • A practical guide on D...
Learn Kubernetes: • Complete Kubernetes Co...
How does a browser works: • How does a browser wor...
How nodejs works: • How node JS works | En...
Learn Redux-toolkit: • Learn Redux Toolkit in...
Learn NextJS: • Nextjs Full stack course
Learn Typescript: • Why to learn Typescript
Learn Javascript: • Welcome to new JavaScr...
Learn React Native: • React Native Mastery: ...
Learn Zustand: • React state management...
Learn Golang: • How to get started wit...

Пікірлер: 105
@vedantdeshpande2723
@vedantdeshpande2723 4 ай бұрын
Really thank you this is one of the best react series I have watched and really appreciate your hard work man
@akashmatsagar9970
@akashmatsagar9970 8 ай бұрын
My friend purchased a course at just 200 rupees cost react course and now he at 12 lpa ..& this is the power of learning quality at this amount in this costful world.i also purchased
@HrissW
@HrissW 8 ай бұрын
Fr? Is it his first job?
@akashmatsagar9970
@akashmatsagar9970 8 ай бұрын
Yes his starting actually half of above but within six months he is at above in same company@@HrissW
@_sarthakmisal
@_sarthakmisal 4 ай бұрын
Naah bruh ​@@HrissW
@jesarmarcin1149
@jesarmarcin1149 8 ай бұрын
Hello Hitesh I just want to thank you for this series coz it has helped me alot
@ItsjustStarFoxNBD
@ItsjustStarFoxNBD 3 ай бұрын
Hitesh your videos are incredible. Thank you so much!
@loudcapricorn5513
@loudcapricorn5513 2 ай бұрын
This was a really great video providing deep learning which is actually asked in interviews. Thank you for this wonderful content
@ritwikyadav9749
@ritwikyadav9749 4 ай бұрын
Thanks Hitesh for these videos, this is one of the best into to react series I have watched. Like it when you explain a lot of other simple concepts like fetch vs axios etc which helps us revise JS as well.
@kattamurinagabhushan9879
@kattamurinagabhushan9879 2 ай бұрын
i just love to watch your tutorials. Learning a lot of courses from you. Thankyou for your efforts.
@Adventures_English
@Adventures_English 5 ай бұрын
Another great video. Thanks again! You are a great teacher!
@pawankand
@pawankand 8 ай бұрын
Very much clear about custom hook in react post watching this video. Thanks Hitesh for great video and am sure this series will be super exciting with upcoming videos :-)
@sharathkumar726
@sharathkumar726 2 ай бұрын
You are amazing teaching skills with great attitude....👍
@user-kk1vu9tz8g
@user-kk1vu9tz8g 8 ай бұрын
You give me so much positive energy. Blieve me, this has equal important to information itself
@devaprem7777
@devaprem7777 8 ай бұрын
IT HELPS ME A LOT TO GO THOUGHT THE CONCEPTS BRO... THANKS A LOT
@saimanu1997
@saimanu1997 4 ай бұрын
Thank you so much Hitesh, as usual your teaching is top notch.
@lcandao8660
@lcandao8660 7 ай бұрын
I'm nearing the end of the current videos in this series and I'm extremely satisfied with the explanations. Keep up the great content.
@awnishprasad9367
@awnishprasad9367 6 ай бұрын
from where i get those api
@rakteemmullick2908
@rakteemmullick2908 2 ай бұрын
thank you very much sir for such an amazing tutorial. Especially the concept of hooks got much more clearer to me.
@prasadpatil2371
@prasadpatil2371 8 ай бұрын
Absolutely enjoyed the latest video! Gained some valuable knowledge-thanks a bunch!
@ravisankarp61
@ravisankarp61 8 ай бұрын
​Thank you so much, this video has helped a lot and I have learned a lot .Will watch more videos on ur channel.
@achuthanboovaragan3546
@achuthanboovaragan3546 6 ай бұрын
Learnt about custom hooks clearly. Thank you!!
@morecoinbull
@morecoinbull 6 ай бұрын
thanks for making these. they are really helpful!!
@hajsdusau
@hajsdusau 2 ай бұрын
Great Video Hitesh!
@purvesh62
@purvesh62 8 ай бұрын
Thank you for another informative video.
@manjuhakki5635
@manjuhakki5635 7 ай бұрын
Nice video. Keep doing it consistently.
@divinendubuisi9593
@divinendubuisi9593 7 ай бұрын
thank you for the project, a lot was learned. I really appreciate
@iBounty12
@iBounty12 4 ай бұрын
really good project with lot to learn from it, thanks
@brunohenrard
@brunohenrard 26 күн бұрын
Thank you for these high quality videos, I'm watching them and then trying to make the app on my own. It looks easy when you are doing it but much more difficult while being alone :-).
@mohammad-ravoof
@mohammad-ravoof 3 ай бұрын
Thanks alot hitesh.
@mahendrarajput2870
@mahendrarajput2870 4 ай бұрын
thank brother for sharing content.
@NikhilGupta-qn8jl
@NikhilGupta-qn8jl Ай бұрын
Thanks for amazing content.
@ChetnaAglawe
@ChetnaAglawe 3 ай бұрын
Thank you so much ,great learning video, help a lot.
@aniket7390
@aniket7390 6 ай бұрын
Completed the project with tsx, found one issue with swapping values but thanks to comment section i was able to figure it out quickly. Thank you so much hitesh
@sandeepanmazumdar8486
@sandeepanmazumdar8486 3 ай бұрын
did you face issue while fetching the data from api? if not, can you please help?
@deepeshpakhare
@deepeshpakhare 8 ай бұрын
Thanks for another great video. Learnt a lot. Can we now delve into testing react components with you ?
@rishabhraj1208
@rishabhraj1208 5 ай бұрын
great explanation
@thearmanahmed_
@thearmanahmed_ 8 ай бұрын
thanks hitesh
@Adventures_English
@Adventures_English 5 ай бұрын
If you can't figure out why the values are not swapping consider this from MDN: TYPE The type of the button. Possible values are: SUBMIT: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value. RESET: The button resets all the controls to their initial values. BUTTON: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur.
@dolfieaspeling9893
@dolfieaspeling9893 5 ай бұрын
Another banger , keep them coming :)
@akashmatsagar9970
@akashmatsagar9970 8 ай бұрын
Thank you
@youtubecodinggithub6145
@youtubecodinggithub6145 8 күн бұрын
I really don't comment to any video i am not that person but seriously saying you are a gem and i love the content from kerala 😍
@003_abhishekdubey4
@003_abhishekdubey4 4 ай бұрын
Great Sir
@souvikdas_01
@souvikdas_01 7 күн бұрын
Thank you sir for such an amazing react content.
@user-gr5yn9xo5r
@user-gr5yn9xo5r Ай бұрын
thank u its very useful!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@deenuakash6652
@deenuakash6652 7 ай бұрын
Thanks for the informative project Hitesh. I faced one problem which is, the To values remains while swapping. After hours of debugging found that the problem is in convert function. The value actually got swapped for a split second after which Convert function runs again with the updated amount but with old currencyInfo. Please comment if someone fixed this :) Edit: Having convert function on onClick event of convert button instead of form's onSubmit fixed it.
@user-wr8lp8ou6t
@user-wr8lp8ou6t 7 ай бұрын
Thanks a lot! Saved time!
@lcandao8660
@lcandao8660 7 ай бұрын
After hours of looking as well, I finally figured out what was causing the issue. Since this is all happening in a we define the type for our 'Convert' button as "submit". We never set a type for our 'Swap' button and so it takes it by default as a form submit. By setting the type="button" for my 'Swap button, I'm able to successfully swap the amounts.
@akashsaxena7339
@akashsaxena7339 3 ай бұрын
@@lcandao8660 can you tell the steps you used to debug this
@mattakalyan1427
@mattakalyan1427 5 ай бұрын
Thanks a lot
@manoyal
@manoyal 8 ай бұрын
The only thing left that I want to understand is to be able to use the useReducer hook, together with useEffect hook to do state management without relying on external libraries like Redux
@Zara.Khurram
@Zara.Khurram 3 ай бұрын
Thank you for creating such great content. I am trying to learn coding by watching your videos. Quick question: I followed all the steps but in the currency converter I made I am unable to change the input Amount. what can I do to solve it? I will really appreciate your help.
@user-py8ub6jk1f
@user-py8ub6jk1f 2 ай бұрын
thank u sir
@subuhifarooqui5165
@subuhifarooqui5165 Ай бұрын
Thanks 🙏🙏🙏🙏
@sankalpgupta8917
@sankalpgupta8917 6 ай бұрын
sir really like your theme #chaiTheme
@user-rv2vs3kx1u
@user-rv2vs3kx1u 6 ай бұрын
Thanks
@olukayodepaul7070
@olukayodepaul7070 2 ай бұрын
nice work. pls what is the name of the plugin you said you install that help you design faster?
@AashutoshSingh-xq7gy
@AashutoshSingh-xq7gy 20 күн бұрын
Thank you very much sir
@anandj3616
@anandj3616 8 ай бұрын
please do javascript series in english too
@_sarthakmisal
@_sarthakmisal 4 ай бұрын
Hitesh bhai Chai aur code pe aapne direct code likha hai toh samza nahi issi liye yaha aaya hu Hope that won't get disappointed this time
@ruxisama7473
@ruxisama7473 4 ай бұрын
Thanks
@prashanthkumar7610
@prashanthkumar7610 8 күн бұрын
Thank you so much
@saisashreek9249
@saisashreek9249 Ай бұрын
Hey hitesh curency converter API link failed.
@MILDTALK
@MILDTALK 7 ай бұрын
Hi Hitesh, I have a doubt like you have swapped from and to value without using any third variable. So my question is 1. setFrom(to) 2. setTo(from) As soon as line 1 runs, its value is changed . How does it preserve its previous value? How is it working?? Any concept I am missing ? Pls suggest me.
@lcandao8660
@lcandao8660 7 ай бұрын
From my understanding, he explained this in his video "Why you need hooks and project", using the counter project. In react, when you call a function, if you want it to change the value in real time, you must use a callback that forces it to wait for the value change. Otherwise, it does batch operations and applies the changes at the end of the function call. In this case, since it's a batch operation, setFrom() and setTo() don't have their values changed until the end, in which case they're effectively swapped. This is my understanding from studying his videos, I hope it helps!
@mrinalbera6080
@mrinalbera6080 8 ай бұрын
Hello sir, pranam. Sir I want to do your node js backend course from learn code from me website is that course sufficient for backend learning? In ineuron it's same topics videos but price is much high why sir? If you cleary doubt it will very grateful ❤
@huletech
@huletech 8 ай бұрын
hey hitesh can you make tutorial on how to use react js with postgresql
@HiteshChoudharydotcom
@HiteshChoudharydotcom 8 ай бұрын
How to use reactjs with postgresql ?
@huletech
@huletech 8 ай бұрын
I watched the video thank you for your response sir
@salmanfarshisajib6512
@salmanfarshisajib6512 4 ай бұрын
❤👍
@user-bj7nh9kx1g
@user-bj7nh9kx1g 3 ай бұрын
👍
@tanyamaurya9626
@tanyamaurya9626 8 ай бұрын
Hello sir, I’ve been trying to access this course of Mern stack on your site but somehow it’s showing sorry for the inconvenience, contact admin.. I’ve already bought this course 2 months back. Could you please let us know by when the issue will be resolved?
@madhummh77
@madhummh77 8 ай бұрын
@oneway4370
@oneway4370 8 ай бұрын
Sir ji explain super keyword please
@juanmacias5922
@juanmacias5922 8 ай бұрын
51:20 somehow my swap function isn't setting the correct setConvertedAmount(amount), just stays as the old convertedAmount. xD even tried using temp values, I'm just going to walk away for now lol thanks for the video!
@dhruvcharkhawala7509
@dhruvcharkhawala7509 6 ай бұрын
yes mine also ping here if you find the solution
@awnishprasad9367
@awnishprasad9367 6 ай бұрын
from where i get those api
@sharathkumar726
@sharathkumar726 2 ай бұрын
🥶
@kazitanim007
@kazitanim007 Ай бұрын
This currency api link is not valid anymore, please update.
@user-bg5hw8jp1o
@user-bg5hw8jp1o 8 ай бұрын
How to run this project ?
@NitishJain-ww2fv
@NitishJain-ww2fv 8 ай бұрын
hey hitesh, the "To" value is not getting updated with Swap function. I tried saving the values in const befor setting in "setXXXX" but no luck. The Fetch API call is happening twice on page load. I tried to debug a lot but couldn't able to found the reason. Any suggestion?
@lcandao8660
@lcandao8660 7 ай бұрын
After hours of looking as well, I finally figured out what was causing the issue. Since this is all happening in a we define the type for our 'Convert' button as "submit". We never set a type for our 'Swap' button and so it takes it by default as a form submit. By setting the type="button" for my 'Swap button, I'm able to successfully swap the amounts. Hope this helps.
@Adventures_English
@Adventures_English 5 ай бұрын
@@lcandao8660 Thanks so much for putting the time in to figure this out. That isn't an obvious solution to me at this point. Mind sharing how you figured it out?
@Adventures_English
@Adventures_English 5 ай бұрын
@@lcandao8660 FROM MDN type The type of the button. Possible values are: submit: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value. reset: The button resets all the controls to their initial values. button: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur.
@lcandao8660
@lcandao8660 5 ай бұрын
I haven't looked at the code in several weeks, but I can go through my thought process from what I recall. I debugged the problem with several breakpoints within the swap function call. I looked at the value going in and what would come out. I noticed when slowed down, the function call would effectively swap but immediately swap again. This would cause my "To" and "From" values to be identical. After a while of staring at code, I noticed there was no type assigned to the "Swap" button. but there is a type assigned to "Convert" button. Then I started to experiment with eliminating the form template and just running the buttons alone. This didn't work, so the last thought I had was "what if this button is submitting the form?". That is when I input the type and it solved my problem@@Adventures_English
@joelfoka
@joelfoka 3 ай бұрын
It seems that this API no longer works
@Adventures_English
@Adventures_English 5 ай бұрын
BTW if you are actually trying to build a currency converter consider looking for a better API. This one is not accurate in a lot of case. For example, the Peruvian sol it get wrong by orders of magnitude.
@abhayjain8482
@abhayjain8482 2 ай бұрын
My currency type button is not working anyone have solution of when i clicked that button that button don't show any name just print all countries value in console
@sandhiyasandhiya1603
@sandhiyasandhiya1603 8 ай бұрын
I have paid Rs.700 for your complete python course.But actually it's not working for the past two days. The message is displayed as your session is logged out. But i have paid 700 just 2 weeks ago.. And it is valid for more than 1 yr.. I want to know why I can't login to my account
@tanyamaurya9626
@tanyamaurya9626 8 ай бұрын
Yes correct, it's showing contact to admin..
@user-rj9im3lp3y
@user-rj9im3lp3y 8 ай бұрын
@sandhiyasandhiya1603 are you able to login now?
@tanyamaurya9626
@tanyamaurya9626 8 ай бұрын
Sir, the ineuron team is not granting us the access to our LCO courses. Instead, they are issuing refunds for the amount we initially paid for the course on LCO. I purchased a course from LCO for 300 rupees and now they are offering the same course on their site at 25,000 rupees! Sir kindly provide us the access so that we can continue our learnings from where we are made to left off! Is there anyone else who is having the same issue of accessing LCO courses? Please reply to this text
@kannusingh8059
@kannusingh8059 3 ай бұрын
hey where is helper file buddy
@jatinudasi5056
@jatinudasi5056 2 ай бұрын
the api has stopped working. i am getting the error
@AhmadTauseef-lu6he
@AhmadTauseef-lu6he 2 ай бұрын
api not working
@NiteshKumar-of3is
@NiteshKumar-of3is 2 ай бұрын
Bro Hindi me bhi bat kar lo
@joynikub6216
@joynikub6216 Ай бұрын
Not at all fun boss. in this video it feels like you have the curse of knowledge. You do stuff as if we already know what you are doing but we dont. to watch your 1 hour video, we have to keep looking for stuff on internet for 2 days
@amritajain9664
@amritajain9664 7 ай бұрын
Gained some valuable knowledge
@BinnuKrishna2.o
@BinnuKrishna2.o 18 күн бұрын
@Donald.L.Rosenberg
@Donald.L.Rosenberg 28 күн бұрын
Hitesh your videos are incredible. Thank you so much!
@abhishekvishwanath8388
@abhishekvishwanath8388 5 ай бұрын
Thank you
@technosmart4298
@technosmart4298 5 ай бұрын
Thank you
@Gotoheaven06
@Gotoheaven06 4 ай бұрын
Thank you
@sarath6485
@sarath6485 4 ай бұрын
Thank you
@sreelakshmik.s2118
@sreelakshmik.s2118 Ай бұрын
Thank you
React router crash course
55:54
Hitesh Choudhary
Рет қаралды 29 М.
useEffect, useRef and useCallback with 1 project in Reactjs
40:18
Hitesh Choudhary
Рет қаралды 18 М.
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 16 МЛН
They RUINED Everything! 😢
00:31
Carter Sharer
Рет қаралды 26 МЛН
🍟Best French Fries Homemade #cooking #shorts
00:42
BANKII
Рет қаралды 62 МЛН
Custom Hooks in React (Design Patterns)
12:56
Cosden Solutions
Рет қаралды 33 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 155 М.
Build A Currency Converter In React
26:37
Web Dev Simplified
Рет қаралды 126 М.
ReactJS Course [12] - Custom Hooks Tutorial
22:54
PedroTech
Рет қаралды 24 М.
Create your own react library and JSX
31:30
Hitesh Choudhary
Рет қаралды 20 М.
Learn Custom Hooks In 10 Minutes
9:38
Web Dev Simplified
Рет қаралды 243 М.
How to learn react | A react Roadmap
19:18
Hitesh Choudhary
Рет қаралды 30 М.
When Your Chiropractor Owns a Cyber Truck
0:36
Mini Katana
Рет қаралды 30 МЛН
接下来就是路飞救两个小孩#海贼王  #路飞
0:39
路飞与唐舞桐
Рет қаралды 8 МЛН
Steve's Snack ⛏ pt.3
0:46
Sushi Monsters
Рет қаралды 1,6 МЛН
👮🔫
0:32
Kan Andrey
Рет қаралды 3,4 МЛН