Custom hooks in react | currency Project

Ойын-сауық

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...

Пікірлер: 101

  • @loudcapricorn5513
    @loudcapricorn5513Ай бұрын

    This was a really great video providing deep learning which is actually asked in interviews. Thank you for this wonderful content

  • @vedantdeshpande2723
    @vedantdeshpande27234 ай бұрын

    Really thank you this is one of the best react series I have watched and really appreciate your hard work man

  • @ItsjustStarFoxNBD
    @ItsjustStarFoxNBD2 ай бұрын

    Hitesh your videos are incredible. Thank you so much!

  • @jesarmarcin1149
    @jesarmarcin11497 ай бұрын

    Hello Hitesh I just want to thank you for this series coz it has helped me alot

  • @brunohenrard
    @brunohenrard7 күн бұрын

    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 :-).

  • @akashmatsagar9970
    @akashmatsagar99707 ай бұрын

    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

    7 ай бұрын

    Fr? Is it his first job?

  • @akashmatsagar9970

    @akashmatsagar9970

    7 ай бұрын

    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

  • @Adventures_English
    @Adventures_English4 ай бұрын

    Another great video. Thanks again! You are a great teacher!

  • @kattamurinagabhushan9879
    @kattamurinagabhushan98792 ай бұрын

    i just love to watch your tutorials. Learning a lot of courses from you. Thankyou for your efforts.

  • @ritwikyadav9749
    @ritwikyadav97493 ай бұрын

    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.

  • @pawankand
    @pawankand7 ай бұрын

    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 :-)

  • @purvesh62
    @purvesh627 ай бұрын

    Thank you for another informative video.

  • @iBounty12
    @iBounty123 ай бұрын

    really good project with lot to learn from it, thanks

  • @sharathkumar726
    @sharathkumar7262 ай бұрын

    You are amazing teaching skills with great attitude....👍

  • @devaprem7777
    @devaprem77777 ай бұрын

    IT HELPS ME A LOT TO GO THOUGHT THE CONCEPTS BRO... THANKS A LOT

  • @NikhilGupta-qn8jl
    @NikhilGupta-qn8jl24 күн бұрын

    Thanks for amazing content.

  • @lcandao8660
    @lcandao86606 ай бұрын

    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

    5 ай бұрын

    from where i get those api

  • @morecoinbull
    @morecoinbull6 ай бұрын

    thanks for making these. they are really helpful!!

  • @rakteemmullick2908
    @rakteemmullick29082 ай бұрын

    thank you very much sir for such an amazing tutorial. Especially the concept of hooks got much more clearer to me.

  • @divinendubuisi9593
    @divinendubuisi95937 ай бұрын

    thank you for the project, a lot was learned. I really appreciate

  • @hajsdusau
    @hajsdusauАй бұрын

    Great Video Hitesh!

  • @ravisankarp61
    @ravisankarp617 ай бұрын

    ​Thank you so much, this video has helped a lot and I have learned a lot .Will watch more videos on ur channel.

  • @mahendrarajput2870
    @mahendrarajput28703 ай бұрын

    thank brother for sharing content.

  • @manjuhakki5635
    @manjuhakki56357 ай бұрын

    Nice video. Keep doing it consistently.

  • @ChetnaAglawe
    @ChetnaAglawe3 ай бұрын

    Thank you so much ,great learning video, help a lot.

  • @saimanu1997
    @saimanu19973 ай бұрын

    Thank you so much Hitesh, as usual your teaching is top notch.

  • @user-kk1vu9tz8g
    @user-kk1vu9tz8g7 ай бұрын

    You give me so much positive energy. Blieve me, this has equal important to information itself

  • @aniket7390
    @aniket73906 ай бұрын

    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

    2 ай бұрын

    did you face issue while fetching the data from api? if not, can you please help?

  • @Adventures_English
    @Adventures_English4 ай бұрын

    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.

  • @prasadpatil2371
    @prasadpatil23717 ай бұрын

    Absolutely enjoyed the latest video! Gained some valuable knowledge-thanks a bunch!

  • @rishabhraj1208
    @rishabhraj12084 ай бұрын

    great explanation

  • @achuthanboovaragan3546
    @achuthanboovaragan35466 ай бұрын

    Learnt about custom hooks clearly. Thank you!!

  • @mohammad-ravoof
    @mohammad-ravoof3 ай бұрын

    Thanks alot hitesh.

  • @deepeshpakhare
    @deepeshpakhare7 ай бұрын

    Thanks for another great video. Learnt a lot. Can we now delve into testing react components with you ?

  • @dolfieaspeling9893
    @dolfieaspeling98935 ай бұрын

    Another banger , keep them coming :)

  • @003_abhishekdubey4
    @003_abhishekdubey43 ай бұрын

    Great Sir

  • @deenuakash6652
    @deenuakash66526 ай бұрын

    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

    6 ай бұрын

    Thanks a lot! Saved time!

  • @lcandao8660

    @lcandao8660

    6 ай бұрын

    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

  • @user-gr5yn9xo5r
    @user-gr5yn9xo5r28 күн бұрын

    thank u its very useful!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @thearmanahmed_
    @thearmanahmed_7 ай бұрын

    thanks hitesh

  • @olukayodepaul7070
    @olukayodepaul70702 ай бұрын

    nice work. pls what is the name of the plugin you said you install that help you design faster?

  • @Zara.Khurram
    @Zara.Khurram2 ай бұрын

    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.

  • @akashmatsagar9970
    @akashmatsagar99707 ай бұрын

    Thank you

  • @mattakalyan1427
    @mattakalyan14275 ай бұрын

    Thanks a lot

  • @sankalpgupta8917
    @sankalpgupta89175 ай бұрын

    sir really like your theme #chaiTheme

  • @user-py8ub6jk1f
    @user-py8ub6jk1f2 ай бұрын

    thank u sir

  • @manoyal
    @manoyal7 ай бұрын

    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

  • @AashutoshSingh-xq7gy
    @AashutoshSingh-xq7gyКүн бұрын

    Thank you very much sir

  • @subuhifarooqui5165
    @subuhifarooqui516522 күн бұрын

    Thanks 🙏🙏🙏🙏

  • @_sarthakmisal
    @_sarthakmisal4 ай бұрын

    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

  • @anandj3616
    @anandj36167 ай бұрын

    please do javascript series in english too

  • @user-rv2vs3kx1u
    @user-rv2vs3kx1u6 ай бұрын

    Thanks

  • @mrinalbera6080
    @mrinalbera60807 ай бұрын

    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 ❤

  • @ruxisama7473
    @ruxisama74734 ай бұрын

    Thanks

  • @huletech
    @huletech7 ай бұрын

    hey hitesh can you make tutorial on how to use react js with postgresql

  • @HiteshChoudharydotcom

    @HiteshChoudharydotcom

    7 ай бұрын

    How to use reactjs with postgresql ?

  • @huletech

    @huletech

    7 ай бұрын

    I watched the video thank you for your response sir

  • @tanyamaurya9626
    @tanyamaurya96267 ай бұрын

    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?

  • @MILDTALK
    @MILDTALK7 ай бұрын

    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

    6 ай бұрын

    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!

  • @saisashreek9249
    @saisashreek924915 күн бұрын

    Hey hitesh curency converter API link failed.

  • @awnishprasad9367
    @awnishprasad93675 ай бұрын

    from where i get those api

  • @juanmacias5922
    @juanmacias59227 ай бұрын

    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

    5 ай бұрын

    yes mine also ping here if you find the solution

  • @user-bg5hw8jp1o
    @user-bg5hw8jp1o7 ай бұрын

    How to run this project ?

  • @kazitanim007
    @kazitanim00717 күн бұрын

    This currency api link is not valid anymore, please update.

  • @salmanfarshisajib6512
    @salmanfarshisajib65123 ай бұрын

    ❤👍

  • @NitishJain-ww2fv
    @NitishJain-ww2fv7 ай бұрын

    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

    6 ай бұрын

    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

    4 ай бұрын

    @@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

    4 ай бұрын

    @@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

    4 ай бұрын

    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

  • @abhayjain8482
    @abhayjain8482Ай бұрын

    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

  • @user-bj7nh9kx1g
    @user-bj7nh9kx1g2 ай бұрын

    👍

  • @madhummh77
    @madhummh777 ай бұрын

  • @oneway4370
    @oneway43707 ай бұрын

    Sir ji explain super keyword please

  • @joelfoka
    @joelfoka2 ай бұрын

    It seems that this API no longer works

  • @sharathkumar726
    @sharathkumar7262 ай бұрын

    🥶

  • @tanyamaurya9626
    @tanyamaurya96267 ай бұрын

    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
    @kannusingh80592 ай бұрын

    hey where is helper file buddy

  • @sandhiyasandhiya1603
    @sandhiyasandhiya16037 ай бұрын

    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

    7 ай бұрын

    Yes correct, it's showing contact to admin..

  • @user-rj9im3lp3y

    @user-rj9im3lp3y

    7 ай бұрын

    @sandhiyasandhiya1603 are you able to login now?

  • @Adventures_English
    @Adventures_English4 ай бұрын

    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.

  • @jatinudasi5056
    @jatinudasi5056Ай бұрын

    the api has stopped working. i am getting the error

  • @AhmadTauseef-lu6he

    @AhmadTauseef-lu6he

    Ай бұрын

    api not working

  • @NiteshKumar-of3is
    @NiteshKumar-of3isАй бұрын

    Bro Hindi me bhi bat kar lo

  • @joynikub6216
    @joynikub621629 күн бұрын

    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
    @amritajain96646 ай бұрын

    Gained some valuable knowledge

  • @Donald.L.Rosenberg
    @Donald.L.Rosenberg9 күн бұрын

    Hitesh your videos are incredible. Thank you so much!

  • @technosmart4298
    @technosmart42984 ай бұрын

    Thank you

  • @abhishekvishwanath8388
    @abhishekvishwanath83884 ай бұрын

    Thank you

  • @Gotoheaven06
    @Gotoheaven064 ай бұрын

    Thank you

  • @sarath6485
    @sarath64853 ай бұрын

    Thank you

  • @sreelakshmik.s2118
    @sreelakshmik.s211811 күн бұрын

    Thank you

Келесі