Why you need hooks and project
Vložit
- čas přidán 20. 08. 2023
- Visit chaicode.com for all related materials, community help, source code etc.
Sara code yaha milta h
github.com/hiteshchoudhary/
Discord pe yaha paaye jaate h:
""/discord
Instagram pe yaha paaye jaate h:
/ hiteshchoudharyofficial - Zábava
React is temporary but Hitesh sir explanations are permanent 🎉
😍
Absolutely right
Baap of coding channel in youtube. ("Thanks");
Why temporary?
thats right
Hooks in React ⚛
Intro 0:00
Start 2:21
creating the project 2:30
UI updation with simple JS 8:00
Problem in UI updation with JS 10:50
Hooks in React intro 13:00
Hooks (useState) implementation 15:13
Assignment 26:11
Conclude 27:14
Thank you sir.
17:36 samajh gaye sir ji.. bahut hi practice example se aapne realise karva diya ki react ki kya jarurat aur power hai aur react exactly kya problem solve karta hai.. 🙌
pehli baar dhng se smjh aaya ye concept , thnk you so much sr
25:11 state changes are asynchronous that's why the value in console is not being updated immediately. An important detail that got overlooked in the video, maybe because the agenda for this one is a little different. Keep the good work up, very helpful......
This comment needs to be at top.
Bro Really thank you bro, I am breaking my head since last 3 days why it not updating same value..
Really thanks Man
Hello Bro,
{setCount((count)); console.log(await count); count++; }}>
count is {count}
Bro I have tried using async and await but, let me give example : when I have clicked the button 1st it is logged 1 and i have tried again but it again logged 1 and i tried once more but it logged 2, on again clicking it logged 2, this means the value of the count is changing when the button is pressed twice
Please do replay Bro
function App() {
let [count, setCount] = useState(0)
if(count>=20 || count
Add by one
{ setCount((count-1)); ; console.log(count-1); }}>
Subract by one
)
}
I think this will be the correct now
@@g.guruprasad2315 bro remove setCount((count)) and await your code will run properly and I don't think await works in console.log
The way you teach is really clam most of the youtubers rush in teaching idk why. The calm manner really boost up the confidence. Newly subscribed :)
let [value, setValue] = useState(0)
const addValue = () => {
if (value == 20){
setValue(value = 20)
}
else{
setValue(value+1)
}
}
const removeValue = () => {
if (value > 0){
setValue(value - 1)
}
else{
setValue(value = 0)
}
}
This is the whole solution !
Sir your teaching style is just extraordinary , so humble, so many clarity ! Thank you so much ❤❤❤❤❤❤❤❤❤❤❤❤❤❤👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
const addValue = () => {
console.log("clicked", counter);
if (counter < 20) {
setCounter(counter + 1);
}
};
const removeValue = () => {
console.log("clicked", counter);
if (counter >= 1) {
setCounter(counter - 1);
}
};
I have seen your chai aur backend series, and now referring this series, your teaching method is awesome sir, very helpful.
Thanks Bhaiya for being a great explainer. Learning in this video is that React hooks are basically used for updating the UI (User Interface). We don’t need to reflect each and every change manually. React makes UI updation easy. That’s why we should learn about hooks in React.
The way of explaining is awesome. Linking the real world example with the concepts, no one can explain like u sir. I am grateful that learning things from a great professional.Thankyou for the such a amazing content sir.
Probably the best explanation of concepts I've seen on youtube.
I have no words for your explanation sir. now hooks topic is crystal clear.
End level explanations.No what matter what your mood is but when you see his smile your inner coder wake's up and then you forget clocking is ticking.
Sir thank you for creating such a beautiful javascript playlist,one more request sir please create more projects on it so that we can gain confidence in js.
Love from West Bengal ❤
12:30 han smjh gye smjh gye, react bhot hi reactive hai... you explained hooks in such a simple way as a cup of tea... thankyou
"Thanks for being an awesome React teacher! Your teaching makes complex concepts seem so much simpler. Your clear explanations and relatable examples really help us understand and apply React effectively. Grateful for your patience and dedication in guiding us through this journey. Looking forward to building more cool things with React, all thanks to your great teaching!"
Absolutely incredible! Your ability to simplify explanations is truly amazing. I have decided to follow this entire series of react JS from you and intending to not just passively watch, but actively engage and practice every step. The accessibility of learning material in such a user-friendly manner is genuinely refreshing. A big thank you for that! Eagerly looking forward to the release of more tutorials. Keep up the fantastic work! 🚀
Hitesh ji, under the hood Rocket Science to hai, no doubt, leking aapne explain is tarah se kiya hai ki Rocket science lag nahi rahi. HATS OFF to your pedagogy ❤❤❤
Appne itna achhe se samjhaya ki video khatam ho ne se pehelei assignment khatam ho gya
function increment(){
if(counter + 1 > 20){
alert("Limit exceed")
} else {
setCounter(counter+1)
console.log(counter);
}
}
function decrement(){
if(counter-1 < 0){
alert("Value cannot be negetive")
} else {
setCounter(counter-1)
console.log(counter)
}
}
same here
alert("Limit exceed") ek number bhai
// For decrease
if (counter > 0 ) setCounter( counter -1);
// For add
if ( counter < 30)
setCounter ( counter+1)
Itne achche s smjaya ki assignment me sochna hi nhi padha
if(Counter==0){
SetCounter(0)
}
hn tabhi error show kr rha h kuki dimag hi nhi lgaya
itna chhota assignment?
After 1 month of upload & Comment is full of motivation + more than 500 [currently [1369], I am loving how students are appreciating guru ❤ I have been following from Main channel Javascript series from 2k18... But examples and explanation in native language is damnn attraction to these languages
I was never able to write code in react but after watching 2-3 videos of this playlist I am confident enough to write codes and also able to understand what is actually happening behind the scenes , never thought it will be so fun, Thankyou Sir for making these series, your explanations are always best and of top notch quality .😊
Dear Sir,
I am Happy, because of your teaching technique. I hope this will help many people and one small help I argue you to explain that last error, which the value of count is 16 and the value of count in console is 15 and I have tried to know the reason beyond, but i did not get the proper answer.
I hope Chai sir will give replay to my Comment
please sir...... please do replay
I really thank you, for your teaching efforts in React
Have a nice day
I have Completed My React series From some other CZcams Channel some Concepts Got cleard there But I was still Having Doubts i was creating some basic projects with that knowledge but still having some doubts So i decided to take a look at your course and it was like a miracle the knowledge given here by Hitesh sir is immense and deep u basically understand how the react works rather than just therotical knowledge .
Thank You Hitesh Sir For this !!! nd lots of Love!!
❤💘💘
Same Here..I got confidence now after seeing his series
excellent teaching wid smooth style..!! 👌
Ap itne ache se smjhate hy dil krta hy video khtm e na ho 😃 Thank you
Wow, itna smoothly smjhaya, pta hi nhi chla kab video khtm hone pe aagya
Even I know how to use the state hook I'm enjoying the way sir explaining it. Thank you sir✨
Your smile while teaching creates positive energy among us. So, please keep smiling and continue teaching us. 😊❤
Sir your all course is sach in a depth. Thank you for teaching us in depth. I have earned many things which I use in my projects.
Thanks Bhaiya for being a great explainer. Learning in this video is that React hooks are basically used for updating the UI (User Interface). We don’t need to reflect each and every change manually. React makes UI updation easy. That’s why we should learn about hooks in React.Thanks Bhaiya for being a great explainer. Learning in this video is that React hooks are basically used for updating the UI (User Interface). We don’t need to reflect each and every change manually. React makes UI updation easy. That’s why we should learn about hooks in React.
गुरुदेव को प्रणाम 🙏🙏
27:22 " react k basics ho gye h" , this line brings a smile 😊😂😇on my face because sir m thoda dari hui thi react k naam se ..pr aap bahut chill ho ..itni aashani se sab samjha dete ho .. now I am confident ki aap padhaoge to m sikh jaugnig...Thankyou sir❤❤❤
Mane apki Chai with Javascript series b dekhi h .. and it was amazing. ❣❣❣❣
Thanks alot for making us smile while learning to code , most coders are harsh and not like you
Much much better than any paid courses....Thankyou sirr...😊😊
the way you explained the concept of states and hooks was very beautiful...thank you Hitesh bhai..
00:03 Learning hooks and projects helps in understanding concepts
01:55 Create a project called counter using React .
06:05 Creating a counter and updating its value on button click
08:09 Adding values to the browser console and updating the counter
12:27 React provides hooks for updating data in a controlled manner.
14:34 Hooks are essential for code updation and debugging
18:18 The variable counter can be automatically updated in the UI using React.
19:56 Understanding how to update a counter variable
23:28 Understanding the use of hooks and project
25:25 Learn about hooks in React and how they are used
Great explanation Hitesh sir 😍, your video made it even clearer for me
thankyou for making this topic so easy.. no one has taught hooks with such ease :)
Sir hooks bahut hi confusion create kar Raha tha but you made it ❤..... please cover all hooks
Projects me baaki apne aap cover ho jayenge
@@chaiaurcode ok sir thank you 😍
Assignment answer
const addValue = () => {
if(counter {
if(counter>0 ){
counter = counter - 1
setCounter(counter)
}
console.log("Clicked",counter);
}
if I use greater than and equal to and put the increment statement outside the block then the initial value still changes and when I reach 20 on UI and still clicks on addvalue button then UI is not changing but the value is changing inside. when after clicking so much you click on removevalue then you see that your value starts from where you stop clicking and from there it will start decrasing.
const addNumber = () => {
if(count {
if(count>=1){
setCount(count - 1)
}
}
rather goo like this `const addValue = () => {
ctr = ctr + 1
if(ctr
const addValue = ()=> {
if(counter !== 20) {
setCounter(counter + 1);
} else {
counter = 20;
}
}
const removeValue = ()=> {
if(counter !== 0) {
setCounter(counter - 1);
} else {
counter = 0;
}
}
let [counter,setCounter] = useState(0);
let addValue = () => {
console.log("Value Added",counter);
setCounter(counter++);
}
let removeValue = () =>
{
console.log("Value Removed",counter);
if(counter !== 0)
{setCounter(counter- -);}
else
{setCounter(0)}
}
Comment krne ke liye specially, office ke laptop m login kiya hai, and yes cricket vali baat yaad rhegi. haha, ... but seriously man very nice explanation .... loved it.
Your style of teaching is just mindblowing sir, almost indulge in react for a couple of months now but was unable to clear this concept ,but after watching your videos I can say confidently " ya I know react & its concepts", regret that I was not starting react from ur course,but grateful that finally, I have best teacher who knows how to build students with clear concepts...
Sir aapka hook wala example sun ke maza aa gaya
mereko bhi har baar Hooks sun ke Hook pull yaad aata😅
Samaj me aa rha 😊
great content sir. Had seen videos of almost every creator on youtube bue never got the confidence in coading but sice whwn i started following you i am getting that confidence
excited to know what more can be offered than such quality content
Thank you sir ❤
Thank you so much sir
Hands Down, the best React series. The way things are explained, marvellous!
thanks , i recently started chai aur react course.I amazed by the amount of knowledge give in a smaller time.
@Everyone please comment on here. The reach is important for us to motivate sir to the highest and squeeze out the best number 1 content of React in hindi from Hitech sir.❤❤❤❤❤❤❤❤
❤️❤️❤️
I am 35 yrs old still not settled in life just started learning react Hitesh Sir you are a big hope for me
what were you doing!!
Guys this is the most important video on syncing on data layer and ui , understand it well , i got this information by paid 24k rs. Thank you hitesh sir
thank you for the video, the way you explain by making small projects make it easy to understand, keep making such videos.
Assignment 1 sol: ->
import { useState } from "react";
function App() {
let [counter, setCounter] = useState(0);
function increment() {
setCounter((p) => {
return p < 20 ? p + 1 : p;
});
}
function decrement() {
setCounter((p) => {
return p > 0 ? p - 1 : p;
});
}
return (
{counter}
increment
decrement
);
}
export default App;
const [count, setCount] = useState(0)
const addValue = () => {
setCount(count + 1)
}
const decValue = () => {
setCount(Math.max(0, count - 1))
}
keep doing great work man! you amaze me by your explanation!
thanks sir for revealing this kind of teaching cause now we know what teaching really means when it comes to understanding of concepts and basics , you have setted standard that no one can stand none another than you..
Sir aapka padhane ka style bahut hi majedar hai...👌
Samjh a gya sir ap puray CZcams per Ak wahid teacher ho Jo acha prhata or sekhata hai love to you
Bhut maza aaya sir ji....pure knowledge
Learning:
React Control the UI
React Says, do whatever you want, but i will control the UI for the App. So that if AnyValues changes i can update that in all the places wherever it is used
Finished this 5th lecture on 13 June. Started in the morning and going for more (absolutely loving it). Will update on every lecture after this.
Bht behtreen series banayi hai sir
Very rightly said sir, any topic can be better understood, when we the need of it. Thankyou so much sir for making each and every topic so easy.
literally i never saw any video with such indepth explanations really hope this channel goes viral
Hitesh Sir , you are an excellent teacher. Your way of teaching is simple and clear. And your Smile 😊❤
Sir, your explanation is really Good. I am enjoying watching your series
Your concept explanation is best, i can't stop smiling when i understand the concept behind ...
One of the best teacher i have ever learnt from
How you explain these concepts so easily and clearly is what makes you a great teacher
Kya analogy h yaar, Australia vs India and cricket, maza hi aa gya
1 hi toh dil h Hitesh sahab kitni baar jeetoge, jeeyo ap hazaar saal ❤🎉
#zabraExample
Thanks for making this level course free, today I am learning a lot with his help, so thank you Hitesh sir.
The approach you take for explaining is just amazing ❤🎉
you are like a gps working for giving direction to new ones in this changing tech world
Both badiya kar rhe ho bhaiya
Epic Playlist ✨
You are the best teacher in the youtube and method of teaching is extremely good.
Sir ab tak mene React ke 5 videos complete kiye he but aapne jis tarahse videos banaye hai. Lots of love and blessings sir. Aapke reply ka wait rahega sir....thank you very much ❤❤
Sir literally your teaching style is awesome
Sir aapka hook wala example sun ke maza aa gaya
mereko bhi har baar Hooks sun ke Hook pull yaad aata😄
12:35 you got my attention sir. The best react video. Thank you for your videos and support .
Nice way of explaining use of hooks .
Great! just great way of learning the concepts. Thank You ! Hitesh Sir!
You are the best teacher for react in the CZcams because you learn how to work in the industry level projects. Thank you so much sir for this amazing series 😊😊
The best thing about you is, {I know you are a Champ coder} but the beauty is you are far better Teacher than a Coder. This is a deadly combination brother | Sir | Mentor | Guru ji | ❤
Bohot maja aya sir aur apka assignment bhi complete ho geye sir
when i saw your video of any any concept i did not understand completely but after watching videos 2nd time all concepts clears automaticallly and i never forgot about taht concept ❤
sir you are the best teacher i ever seen!!!👍
Such a deep and base level video thanks for making this kind of content. Hindi me ayse content is not available anywhere. Please dont make this private.
Really great. Thank you very much for what you are doing ❤
Greattt Explanation!!! Thank you so much🙌
Best Series On CZcams Till Date!!
Thanks a lot bhaiya! These videos really help to clear basics of react
Your teaching is admirable, sir.
@chaiaurcode
Sir at 21:15
useState can work with "const"
but it gave an error, because you re-declare "counter" in line number 18. re-declare of any const variable will give error.
if we will put it like this useState(counter+1), it will work with const also.
your way of explanation is very impressive.
Thank you, for such quality content.
Bahut maza aa rha hai react sikhne me, aapse
Apka samjhane ka tarika achcha hain sir.. ❤❤
Thank-you sir
React ke naam se hi mujhe dar lagta tha aaj se dar khatam ho gaya
or ye easy lagne lga
Amazing video, loved this lecture.
one of the best course on CZcams for React js
Thank you sir ,acche se samajh aaya Jo aaj apne padhya