Комментарии:
Much better explanation than my Udemy course... Thanks!
Ответитьimport { useState} from "react";
function App() {
const [windowWidth, setwindowWidth] = useState(Window.innerWidth)
window.addEventListener('resize', () => {
setwindowWidth(window.innerWidth);
})
return <h1>{windowWidth}</h1>
}
export default App;
we can directly implement without useEffect hook
perfect explanation
ОтветитьReally great explanation! Thank you!
ОтветитьI’ve now watched a couple of your videos for different react hooks and they’re great. Really clear and to the point. Thank you Kyle
Ответитьnice explanation
ОтветитьYou look like Jordi El Nino!!!! But anyways thank you for your content.
ОтветитьWhy is the render printing twice?
ОтветитьSorry, what were you saying...I got lost in your eyes!
ОтветитьVery nice, brother... Thank you!
ОтветитьOnce again knocking it out of the ballpark
ОтветитьWow thank you, bro, now I have a clear idea on useEffect
ОтветитьBro does look like someone named Kyle. Love your content
ОтветитьIsn't it better to put windowwidth in the dependency list ?
useEffect(() => {
window.addEventListener("resize", updateWindowWidth);
}, [windowWidth]);
Thank you so much you really did explained the 'clean up' and how it works exactly, and that is always useEffect run the returns first so if you have any event listener already should gets deleted so you don't ends up with another event listener, if your useEffect gonna create an event listener to listen for something.
God bless you man
❤
Ответитьcan anybody please tell me why does rendered gets printed twice
ОтветитьThis is the most understandable explanation I’ve ever seen
Ответитьwas struggling all day with this thing, now its like crystal clear lol thank youuuu
ОтветитьFinally I understood the concept...wow what a way of teaching man...! So simple and understandable. Thank you so much
ОтветитьNice explain❤
ОтветитьOpen Translate Please!
Ответитьthat was really great. I feel like I understand ever slightly more
ОтветитьYour too good for react
ОтветитьThank you so much!!The examples were quite easy to understand.I got it so well.I wish you the best!
Ответитьnonsense explanation
Ответитьwhy render print 2 times in console ?
Ответитьreally good explanation man..u helped a lot thank u so much..
ОтветитьThe fact that the clean-up code runs before the event listener is a key point that's rarely communicated in docs, tutorials, etc. Very well done!
ОтветитьI understand more in the last 30 minutes than I did 8 hours of lectures and workshops ago. Thank you so much!
ОтветитьMy, oh, my. What a helpful video for a 42-year old guy in a bootcamp.
ОтветитьSimple and Clear
ОтветитьThe best explanation, great job man
ОтветитьI need subtitles for this video!! 😢
ОтветитьThank you man !!
Ответитьdude this is not simplified xdd
Ответитьhelpful vid, thanks!
Ответить3 different YT videos taught me how to use the useEffect hook but I only learnt it when I saw your video.
ОтветитьNice video thanks.
Ответитьone of the best explanations ever...loved it
Ответить