Excellent presentation my friend. I was hoping that there might be some general detail about the JS logic of how the buffer switches the pointer. Also, do the variables actually change position in the array [ currentX, setCurrentX ] ? Maybe this might be a topic for another video? Many thanks.
@1minuteunity7594 күн бұрын
Great Video!
@SumanPokhrel019 күн бұрын
What an elegantly explained video. Bravo
@sharonye829728 күн бұрын
nope
@user-rl8qs5su9zАй бұрын
as a person who dont code in Js, this f my brain up so hard
@sidharthvyas5883Ай бұрын
Awesome
@frankdearr27722 ай бұрын
great topic, thanks
@BartekSpitza2 ай бұрын
Amazing video. This was exactly what I was looking for, sadly I had to scroll several times as the top videos titled with “how react actually works” were all just shallow reiterations of the react API.. thank you!
@PhilipFabianek2 ай бұрын
Thank you!
@danieldesales3772 ай бұрын
Great content!
@dan-kn3dm2 ай бұрын
Use 1.25 speed, thank me later. Btw nice video!
@user-vd7tc8bd3g2 ай бұрын
why is there that white flash occasionally while using useLayoutEffect()?
@Stefan-xm9qb3 ай бұрын
And how does this deep knowledge improve my skills as a react developer? I managed to successfully use react for many projects without this knowledge.
@PhilipFabianek3 ай бұрын
That is a good question. I was also using React for several years before learning how it actually works. I think it gives one some satisfaction to have a rough idea of how the technology that is being used works. Additionally, I think there are some practical takeaways, for example knowing how keys work and why they are important, etc.
@Stefan-xm9qb3 ай бұрын
I agree there is some satisfaction that I felt. And yes absolutely the thing with the keys is very important. I actually looked up some of my code and I found out I used the key incorectly: I used index as key 😱 {sectionsData.map((section, index) => ( <Container key={index} id={`section-${index}`} style={{ height: "100vh" }} > ... </Container> ))} But I guess this would be much more efficient (if the sectionsData changes like things get prepended for example): {sectionsData.map((section, index) => ( <Container key={section.id} id={section.id} style={{ height: "100vh" }} > ... </Container> ))} But do I really need to understand how the diff function works in order to apply that knowledge? I also could have just read this react documentation: Keys tell React which array item each component corresponds to, so that it can match them up later. This becomes important if your array items can move (e.g. due to sorting), get inserted, or get deleted. A well-chosen key helps React infer what exactly has happened, and make the correct updates to the DOM tree. Rather than generating keys on the fly, you should include them in your data: Pitfall You might be tempted to use an item’s index in the array as its key. In fact, that’s what React will use if you don’t specify a key at all. But the order in which you render items will change over time if an item is inserted, deleted, or if the array gets reordered. Index as a key often leads to subtle and confusing bugs. Similarly, do not generate keys on the fly, e.g. with key={Math.random()}. This will cause keys to never match up between renders, leading to all your components and DOM being recreated every time. Not only is this slow, but it will also lose any user input inside the list items. Instead, use a stable ID based on the data. Note that your components won’t receive key as a prop. It’s only used as a hint by React itself. If your component needs an ID, you have to pass it as a separate prop: <Profile key={id} userId={id} />. Source: react.dev/learn/rendering-lists Anyway now I started learning flutter and I wonder if flutter Widgets rendered as lists also need keys? I did some research and you can also provide keys in flutter to optimise re-rendering: www.flutterclutter.dev/flutter/tutorials/2023-04-08-how-to-use-keys/ But I think if I had read the react docs instead of understanding how this Diff function in react works I wouldn't have also assumed that in flutter there is a similar thing. So I don't understand how that knowledge of the react Diffing algorithm helps me. So maybe if you are trying to learn a similar but different technology maybe if you understand it in depth how the first technology works under the hood it may be helpful or may not? And I guess for static lists that don't change it's unnecessary to add keys. That's something I wouldn't have known if I wouldn't understand how the Diffing function in react works. So to summarise it is useful to have this deep knowledge for optimising and that knowledge can also be mapped to different technologies? Did I miss something? I still am not satisfied with my own answer. By the way if you could start learning React from beginning like someone would erase your memories and you would time travel in the past would you first just learn to "use" react for couple weeks and then start look into how it works under the hood or the other way around? @@PhilipFabianek
@Stefan-xm9qb3 ай бұрын
I agree there is some satisfaction that I felt. And yes absolutely the thing with the keys is very important. I actually looked up some of my code and I found out I used the key incorectly: I used index as key 😱 {sectionsData.map((section, index) => ( <Container key={index} id={`section-${index}`} style={{ height: "100vh" }} > ... </Container> ))} But I guess this would be much more efficient and avoid some bugs: {sectionsData.map((section, index) => ( <Container key={section.id} id={section.id} style={{ height: "100vh" }} > ... </Container> ))} But do I really need to understand how the diff function works in order to apply that knowledge? I also could have just read this react documentation: Keys tell React which array item each component corresponds to, so that it can match them up later. This becomes important if your array items can move (e.g. due to sorting), get inserted, or get deleted. A well-chosen key helps React infer what exactly has happened, and make the correct updates to the DOM tree. Rather than generating keys on the fly, you should include them in your data: Pitfall You might be tempted to use an item’s index in the array as its key. In fact, that’s what React will use if you don’t specify a key at all. But the order in which you render items will change over time if an item is inserted, deleted, or if the array gets reordered. Index as a key often leads to subtle and confusing bugs. Similarly, do not generate keys on the fly, e.g. with key={Math.random()}. This will cause keys to never match up between renders, leading to all your components and DOM being recreated every time. Not only is this slow, but it will also lose any user input inside the list items. Instead, use a stable ID based on the data. Note that your components won’t receive key as a prop. It’s only used as a hint by React itself. If your component needs an ID, you have to pass it as a separate prop: <Profile key={id} userId={id} />. Source: react.dev/learn/rendering-lists @@PhilipFabianek
@mr.duckie._.3 ай бұрын
i would build a programming language where null + null = 1, but null * 2 = null
@ramanpreetsingh1863 ай бұрын
great explanation!!!!
@cusematt233 ай бұрын
These videos are very underrated and underviewed imo ... as someone that tends to get parallelized until i "really get something" ... your videos did a ton for me.
@PhilipFabianek3 ай бұрын
Thank you so much!
@js-noob3 ай бұрын
please create more videos!!!
@js-noob3 ай бұрын
Please create more videos!!
@user-kn6no9hz4o3 ай бұрын
Very usefull and clear video, thank you!
@zGrowthLabs3 ай бұрын
incredible explanation!
@mdtanviralam75713 ай бұрын
Fantastic explanation detailing React Fiber-very helpful! Please continue creating this kind of video content.
@nextleveltech2673 ай бұрын
Thank you... Really informative 👍
@praveenupadhyay14153 ай бұрын
Fabianek You beauty, Although I was knowing some of the concept, but I think when you see this video it just blew me. gonna recommend more and more. ♥♥♥
@prathameshkhetre14943 ай бұрын
00:00 Understanding the basics of React 01:50 A React component is a class or function that outputs an element tree. 03:44 React elements, components, and instances 05:42 React uses a virtual DOM to efficiently update the real DOM 07:38 React's Diffing algorithm relies on two important assumptions 09:33 React's reconciliation algorithm explained 11:30 React renderers generate and insert elements during reconciliation. 13:25 React communicates with renderers using dispatchers.
@andrebrandao94513 ай бұрын
What a pity you don't post videos anymore. =(
@PhilipFabianek3 ай бұрын
There will be videos in the future, but I am sadly quite busy right now
@zahidshaikh31224 ай бұрын
Before this, I was working BLINDLY on React and any other library or framework that is out their. This very content opened my EYES 👀.
@omarpervez56574 ай бұрын
Have to say bunch of words about this video but not have much time to do it. You did a great job that I can't explain. Keep it up your great work. Have subscribed your Channel 👍
Great video! This really cleared up a lot of misunderstandings I had about React Suspense. Now that it's in a stable version I'll try experimenting with it 🚀
@VarunJain155 ай бұрын
JavaScript is Not Weird, there is a reason behind it.
@naturalguardian58855 ай бұрын
Awsome work ! keep going this !
@prathameshkhetre14945 ай бұрын
crisp and clear, loved the explanation!
@DemystifyFrontend5 ай бұрын
This is really awesome content .
@gnaneshnayak45925 ай бұрын
Yes❤
@iShallEatChips5 ай бұрын
You are a damn smart man!
@MrAdityaSingal5 ай бұрын
Awesome content!!
@mazdysoraya61215 ай бұрын
Wow thanks.
@vishalkuwar65796 ай бұрын
wohh what a informative video. Just great!!!!. I dont Know why you stopped making videos but you should make more videos/
@PhilipFabianek6 ай бұрын
Thank you, I am currently very busy but there will be videos in the future
@AleySoundz6 ай бұрын
Thank you for this video it was very helpful.
@Ramesh-js6 ай бұрын
Basically, JSX Can be conveted to React.createElement(... ) By Babel, I''ve written JSX code without importing React! if we see that React imported , then somewhere React.something used !
@Ramesh-js6 ай бұрын
In order to be converted make sure you have installed babel.
@sgmvideos51756 ай бұрын
what is weird on that object + x is not a number? .1 + .2 = .3000... not just in javascript, it's in any programming language that stores floating point number as 1.X * 2 ^ n typeof NaN (not a number) being a number might seem strange, but it's just part of the object, which other object should it be under? 3 > 2 > 1 also not weird, works like this: 3 > 2 returns true, that is equal to 1, 1 > 1 is false... that is weird just to bad programmers. typeof null being object is same as NaN, null is used when something should return object, but there is nothing to be returned 999... being 100... is the same thing as .1 + .2, javascript stores everything as double hence the moment number is too large, it has to round it the rest is the stuff I watched this for
@PhilipFabianek6 ай бұрын
You are of course correct, but you could argue this way for pretty much all things in this video. All of the explanations are available at www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@sgmvideos51756 ай бұрын
I was trying to point out mainly the stuff that is not just the javascript stuff, there are 3 main rules in JS that cause all the weird stuff - rule 1 is everything except undefined is object, rule 2 is javascript first tries to do operation on objects themself, if unsucessful, than try to cast, and than throw error, and rule 3 I forgot while I was writing this, but I know there was one more important thing to remember :D
@mrwick2op6 ай бұрын
❤
@mrwick2op6 ай бұрын
Great video , thanks brother it helped alot to understand react better.
@tmanley19856 ай бұрын
This is amazing content.
@TischenkoPasha7 ай бұрын
Thank you! Great professional job done with this videos, wish you all the best!
@StatisticsTheory7 ай бұрын
Finally! I've been looking for this series for the past week. Great stuff Philip 😁