I appreciate you so much bro helping us out and taking from your time to teach us coding for free and gathering money for kids from your videos all that and doing that in a fun way for viewers W man W to your parents
By the way, wouldn't using document.title = ... directly in the component be equivalent to useEffect(() => {document.title = ...}) ? In both cases, they are executed after each rerender?
The only thing which I'm not sure of following is when does exactly a component unmount? Is this something which you manually have to do? Since you were able to change the title of your window by listening to the event, then I assume it never unmounted? (In other words, unmounting is done manually by you?) thanks
Hi bro thank you so much for this. Can you please make a detailed react course instead of individual video about topics? Please make a video on next js also.
import React, {useState, useEffect} from "react";
function MyComponent() {
const [width, setWidth] = useState(window.innerWidth);
const [height, setHeight] = useState(window.innerHeight);
useEffect(() => {
window.addEventListener("resize", handleResize);
console.log("EVENT LISTENER ADDED");
return () => {
window.removeEventListener("resize", handleResize);
console.log("EVENT LISTENER REMOVED");
}
}, []);
useEffect(() => {
document.title = `Size: ${width} x ${height}`;
}, [width, height]);
function handleResize(){
setWidth(window.innerWidth);
setHeight(window.innerHeight);
}
return (
Window Width: {width}px
Window Height: {height}px
);
}
export default MyComponent;
Can you do Laravel please
only video that ı understood useEffect thanks man more videos please never leave us :)
You explain things in a simple and straightforward way.
Hi Bro, love this course on React 👍👍. Hope you can keep going into more advanced levels. 👍👍
first, Subsciber from 2 years
Your Javascript and Python Course is The Best
Love from India ❤❤❤❤
Bro code pls reply to me i love your work❤❤❤🎉🎉🎉
I appreciate you so much bro
helping us out and taking from your time to teach us coding for free
and gathering money for kids from your videos
all that and doing that in a fun way for viewers
W man
W to your parents
This is my fourth tutorial on this subject ad neth first one I really grasped. Thank you for your time.
Fu*k logic mathematique , code bro is the best
After reacjs series could you please introduce nodejs or even golang series.... mostly for microservices
You should do a course on SFML (A C++ library)
if i use multiple useState will it affect the performance of the web app, Will it affect the time complexity
does this happen only in react js part of code ? i mean the millions of added listeners .. or it happens in normal js file too ?
what is Side Effect? please someone explain briefly
This is the only tutorial (especially useEffect) that I can easily understand than others. Thank you so much Bra Code 🙏
bro code bro 😅
😂@@karan0611
Very interesting and easy absorbable narration 🎉
Express: (i) => { Sincere gratitude }
thanks a lot bro, very helpful!
Where would you learn to code if you started over❤❤
1:51 This is one of the reason why I came here
thank you bro
you're a legend!
You saved my homework!! Your explanation is very clear!! Keep your awesome work!! Thank you!!
By the way, wouldn't using document.title = ... directly in the component be equivalent to useEffect(() => {document.title = ...}) ? In both cases, they are executed after each rerender?
Hey Bro, Noice vid
The only thing which I'm not sure of following is when does exactly a component unmount? Is this something which you manually have to do? Since you were able to change the title of your window by listening to the event, then I assume it never unmounted? (In other words, unmounting is done manually by you?) thanks
Exceptional in the way you teach. Any chance to have the codes of the examples provided?
Hi bro thank you so much for this.
Can you please make a detailed react course instead of individual video about topics? Please make a video on next js also.
This tutorial was on point. Thx! Now I am ready for a more complex examples!
Our Bro is the best as always !Appreciate ur effort ! Don't know what to do without ur videos 💓 Lots of Love from Morocco 🌷🌷
Make java 2024 plz....Big fan love from Nepal
thank you bro code you have helped alot to me
great video bro!!
The best introduction! Thank you! 😃
Please make Reactjs projects as well
thanks for the amazing work brother
can you make redux video?
Have you tried htmx ??
Can you do Laravel please
Can you do spring boot series
thank you
you are the best
Thanks
69th like🤪
Thank you 😊
Amazing
I appreciate you so much