React useEffect() hook introduction 🌟

  Рет қаралды 36,408

Bro Code

Bro Code

Күн бұрын

Пікірлер: 54
@BroCodez
@BroCodez Жыл бұрын
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;
@rumanhasan27
@rumanhasan27 Жыл бұрын
@MO-vr1mw
@MO-vr1mw Жыл бұрын
Can you do Laravel please
@milleniummoses
@milleniummoses 5 ай бұрын
This is my fourth tutorial on this subject ad neth first one I really grasped. Thank you for your time.
@akkun_25
@akkun_25 Жыл бұрын
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
@dasdisdus774
@dasdisdus774 6 ай бұрын
This is the only tutorial (especially useEffect) that I can easily understand than others. Thank you so much Bra Code 🙏
@karan0611
@karan0611 5 ай бұрын
bro code bro 😅
@yuvaranip9544
@yuvaranip9544 4 ай бұрын
😂​@@karan0611
@arcaneacademia
@arcaneacademia 8 ай бұрын
You explain things in a simple and straightforward way.
@abhishektiwari7643
@abhishektiwari7643 2 ай бұрын
His tutorials boost my interest in coding
@alan_ars
@alan_ars 4 ай бұрын
You saved my homework!! Your explanation is very clear!! Keep your awesome work!! Thank you!!
@bperseid
@bperseid 3 ай бұрын
only video that ı understood useEffect thanks man more videos please never leave us :)
@Pywyoyuyp
@Pywyoyuyp 6 ай бұрын
This tutorial was on point. Thx! Now I am ready for a more complex examples!
@houdariyad4889
@houdariyad4889 Жыл бұрын
Our Bro is the best as always !Appreciate ur effort ! Don't know what to do without ur videos 💓 Lots of Love from Morocco 🌷🌷
@hananfadah
@hananfadah 11 ай бұрын
The best introduction! Thank you! 😃
@jane_rosso
@jane_rosso 23 күн бұрын
Respect and Love from India💗💗😇😇
@hola_officia
@hola_officia 10 ай бұрын
Thank you 😊
@kathikr9360
@kathikr9360 9 ай бұрын
thanks for the amazing work brother
@martinemmerson2809
@martinemmerson2809 Жыл бұрын
Hi Bro, love this course on React 👍👍. Hope you can keep going into more advanced levels. 👍👍
@NoTimeWaste1
@NoTimeWaste1 6 ай бұрын
1:51 This is one of the reason why I came here
@syedmajid3202
@syedmajid3202 3 ай бұрын
thanks a lot bro, very helpful!
@ADB29_GolamRabbani
@ADB29_GolamRabbani 2 ай бұрын
thanks for this video Bro❤❤
@Vincent_12770
@Vincent_12770 Жыл бұрын
After reacjs series could you please introduce nodejs or even golang series.... mostly for microservices
@swarnakadeepashan5277
@swarnakadeepashan5277 15 күн бұрын
Crystal clear
@bostongreen1629
@bostongreen1629 6 ай бұрын
Exceptional in the way you teach. Any chance to have the codes of the examples provided?
@Niyaz_karma
@Niyaz_karma Жыл бұрын
Where would you learn to code if you started over❤❤
@marybenish9716
@marybenish9716 Жыл бұрын
Amazing
@FrostyBlue1712
@FrostyBlue1712 Жыл бұрын
Hey Bro, Noice vid
@LazizbekTurayev-bs8by
@LazizbekTurayev-bs8by 8 ай бұрын
thank you bro code you have helped alot to me
@durgfestivalvibes
@durgfestivalvibes 7 ай бұрын
great video bro!!
@BishanTamang-rk5ji
@BishanTamang-rk5ji Жыл бұрын
Make java 2024 plz....Big fan love from Nepal
@KingOfMadnesss
@KingOfMadnesss Жыл бұрын
You should do a course on SFML (A C++ library)
@codegenesis2130
@codegenesis2130 Жыл бұрын
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.
@Zaher24
@Zaher24 5 ай бұрын
you're a legend!
@minkhant4167
@minkhant4167 9 ай бұрын
thank you you are the best
@andromilk2634
@andromilk2634 10 ай бұрын
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?
@andromilk2634
@andromilk2634 10 ай бұрын
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
@DeveloperLinux-c3m
@DeveloperLinux-c3m 4 ай бұрын
if i use multiple useState will it affect the performance of the web app, Will it affect the time complexity
@Zomoroda89
@Zomoroda89 6 ай бұрын
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 ?
@otabekmadaminov-z2i
@otabekmadaminov-z2i 3 ай бұрын
thank you bro
@Build33_Studio
@Build33_Studio Жыл бұрын
Bro code pls reply to me i love your work❤❤❤🎉🎉🎉
@MagnusAnand
@MagnusAnand 11 ай бұрын
Have you tried htmx ??
@nadicadizdarevic2835
@nadicadizdarevic2835 Ай бұрын
Thanks !!!
@suwanthadarshana8495
@suwanthadarshana8495 Жыл бұрын
Can you do spring boot series
@KBHASKAR-
@KBHASKAR- 7 ай бұрын
Thanks
@rishabhkedia9304
@rishabhkedia9304 11 ай бұрын
Please make Reactjs projects as well
@hawkar7kurdish440
@hawkar7kurdish440 6 ай бұрын
what is Side Effect? please someone explain briefly
@rifatmunna
@rifatmunna Жыл бұрын
can you make redux video?
@MO-vr1mw
@MO-vr1mw Жыл бұрын
Can you do Laravel please
@xenos112
@xenos112 Жыл бұрын
Fu*k logic mathematique , code bro is the best
@mk-vg1mx
@mk-vg1mx 5 ай бұрын
@Albert_Hall
@Albert_Hall 9 ай бұрын
Very interesting and easy absorbable narration 🎉 Express: (i) => { Sincere gratitude }
@warlordff2395
@warlordff2395 Жыл бұрын
69th like🤪
@ruslangilyazov7733
@ruslangilyazov7733 10 ай бұрын
I appreciate you so much
Build a DIGITAL CLOCK using React in 15 minutes! 🕒
16:00
Bro Code
Рет қаралды 20 М.
React useContext() hook introduction 🧗‍♂️
11:37
Bro Code
Рет қаралды 43 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
React useRef() hook introduction 🗳️
11:18
Bro Code
Рет қаралды 25 М.
Mastering React's useEffect
25:20
Jack Herrington
Рет қаралды 177 М.
7 React Lessons I Wish I Knew Earlier
7:30
Code Bootcamp
Рет қаралды 74 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 178 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
The problem with useEffect
11:37
Cosden Solutions
Рет қаралды 36 М.
React useState() hook introduction 🎣
16:33
Bro Code
Рет қаралды 39 М.
Speed Up Your React Apps With Code Splitting
16:50
Web Dev Simplified
Рет қаралды 397 М.
How to FETCH data from an API using JavaScript ↩️
14:17
Bro Code
Рет қаралды 175 М.