No video

React useEffect() hook introduction 🌟

  Рет қаралды 23,573

Bro Code

Bro Code

Күн бұрын

Пікірлер: 45
@BroCodez
@BroCodez 7 ай бұрын
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 7 ай бұрын
@MO-vr1mw
@MO-vr1mw 7 ай бұрын
Can you do Laravel please
@milleniummoses
@milleniummoses Ай бұрын
This is my fourth tutorial on this subject ad neth first one I really grasped. Thank you for your time.
@akkun_25
@akkun_25 7 ай бұрын
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
@elitegaming8565
@elitegaming8565 7 ай бұрын
first, Subsciber from 2 years Your Javascript and Python Course is The Best Love from India ❤❤❤❤
@dasdisdus774
@dasdisdus774 2 ай бұрын
This is the only tutorial (especially useEffect) that I can easily understand than others. Thank you so much Bra Code 🙏
@karan0611
@karan0611 22 күн бұрын
bro code bro 😅
@yuvaranip9544
@yuvaranip9544 7 күн бұрын
😂​@@karan0611
@arcaneacademia
@arcaneacademia 3 ай бұрын
You explain things in a simple and straightforward way.
@Pywyoyuyp
@Pywyoyuyp 2 ай бұрын
This tutorial was on point. Thx! Now I am ready for a more complex examples!
@houdariyad4889
@houdariyad4889 7 ай бұрын
Our Bro is the best as always !Appreciate ur effort ! Don't know what to do without ur videos 💓 Lots of Love from Morocco 🌷🌷
@bostongreen1629
@bostongreen1629 2 ай бұрын
Exceptional in the way you teach. Any chance to have the codes of the examples provided?
@hananfadah
@hananfadah 6 ай бұрын
The best introduction! Thank you! 😃
@Build33_Studio
@Build33_Studio 7 ай бұрын
Bro code pls reply to me i love your work❤❤❤🎉🎉🎉
@zahersankari7342
@zahersankari7342 22 күн бұрын
you're a legend!
@martinemmerson2809
@martinemmerson2809 7 ай бұрын
Hi Bro, love this course on React 👍👍. Hope you can keep going into more advanced levels. 👍👍
@Vincent_12770
@Vincent_12770 7 ай бұрын
After reacjs series could you please introduce nodejs or even golang series.... mostly for microservices
@kathikr9360
@kathikr9360 4 ай бұрын
thanks for the amazing work brother
@KBHASKAR-
@KBHASKAR- 3 ай бұрын
Thanks
@durgfestivalvibes
@durgfestivalvibes 2 ай бұрын
great video bro!!
@KingOfMadnesss
@KingOfMadnesss 7 ай бұрын
You should do a course on SFML (A C++ library)
@Niyaz_karma
@Niyaz_karma 7 ай бұрын
Where would you learn to code if you started over❤❤
@LazizbekTurayev-bs8by
@LazizbekTurayev-bs8by 4 ай бұрын
thank you bro code you have helped alot to me
@FrostyBlue1712
@FrostyBlue1712 7 ай бұрын
Hey Bro, Noice vid
@NoTimeWaste1
@NoTimeWaste1 Ай бұрын
1:51 This is one of the reason why I came here
@codegenesis2130
@codegenesis2130 7 ай бұрын
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.
@minkhant4167
@minkhant4167 5 ай бұрын
thank you you are the best
@marybenish9716
@marybenish9716 7 ай бұрын
Amazing
@MusaMuhammedOlayinka
@MusaMuhammedOlayinka 6 ай бұрын
Thank you 😊
@BishanTamang-rk5ji
@BishanTamang-rk5ji 7 ай бұрын
Make java 2024 plz....Big fan love from Nepal
@andromilk2634
@andromilk2634 6 ай бұрын
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
@user-oy2mi4oz7t
@user-oy2mi4oz7t Ай бұрын
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 ?
@andromilk2634
@andromilk2634 6 ай бұрын
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?
@hawkar7kurdish440
@hawkar7kurdish440 Ай бұрын
what is Side Effect? please someone explain briefly
@rishabhkedia9304
@rishabhkedia9304 7 ай бұрын
Please make Reactjs projects as well
@Albert_Hall
@Albert_Hall 4 ай бұрын
Very interesting and easy absorbable narration 🎉 Express: (i) => { Sincere gratitude }
@MagnusAnand
@MagnusAnand 7 ай бұрын
Have you tried htmx ??
@suwanthadarshana8495
@suwanthadarshana8495 7 ай бұрын
Can you do spring boot series
@mk-vg1mx
@mk-vg1mx 21 күн бұрын
@MO-vr1mw
@MO-vr1mw 7 ай бұрын
Can you do Laravel please
@rifatmunna
@rifatmunna 7 ай бұрын
can you make redux video?
@AIZEN155
@AIZEN155 7 ай бұрын
Fu*k logic mathematique , code bro is the best
@warlordff2395
@warlordff2395 7 ай бұрын
69th like🤪
@ruslangilyazov7733
@ruslangilyazov7733 6 ай бұрын
I appreciate you so much
Build a DIGITAL CLOCK using React in 15 minutes! 🕒
16:00
Bro Code
Рет қаралды 16 М.
React useContext() hook introduction 🧗‍♂️
11:37
Bro Code
Рет қаралды 26 М.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 49 МЛН
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 18 МЛН
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН
Magic trick 🪄😁
00:13
Andrey Grechka
Рет қаралды 52 МЛН
microsoft doubles down on recording your screen
10:00
Low Level Learning
Рет қаралды 74 М.
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 172 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 157 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Top 6 React Hook Mistakes Beginners Make
21:18
Web Dev Simplified
Рет қаралды 569 М.
The problem with useEffect
11:37
Cosden Solutions
Рет қаралды 33 М.
Build this React To-Do List app in 20 minutes! ☝
22:35
Bro Code
Рет қаралды 48 М.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 49 МЛН