I am a self-taught frontend developer. I know many teachers who teach online, but trust me, the way you explain things is so easy to understand. To me, you are the best teacher. I can't thank you enough. If I had money, I would have definitely bought your courses. Anyways Thank you so much for giving us your valuable time, and I love you.
@nonefvnfvnjnjnjevjenjvonej33846 ай бұрын
react is a steaming pile of hot garbage.. lol..
@seventyMinus16 ай бұрын
@@nonefvnfvnjnjnjevjenjvonej3384 no cap
@ProgramWithErik Жыл бұрын
This is crazy how much you've blown up in the last month! I saw you've created nearly 400 videos in one year, getting 50-100 views per video until recently! It's really inspiring how you never gave up!
@adamd0ggg2 Жыл бұрын
I definitely prefer multiple returns. Most components end up with distinct states that make breaking it down into more declarative components easier to follow. This a personal choice I adopted from React Query tutorials. if(loading){ return } if(error){ return } return If you add a key to PostBody then React will identify each of those components as unique. That will eliminate the race condition and reduce the dependencies in the useEffect Array. Loved your explanation of the setInterval. I never quite understood the problem there.
@joseluisperez5137 Жыл бұрын
I do multiple returns as well because if not, one return can become into a return hell, hard to read and follow
@pete531 Жыл бұрын
cant we just say: {loading ? : error ? : }
@shivambisht9009 Жыл бұрын
@@pete531 Yes, but that's not very readable and scalable.
@ImKeviin9 Жыл бұрын
I prefer that way too
@user-sw1wq8lh2w Жыл бұрын
@@pete531 most teams I've been on ban nested ternaries to avoid complication in logic that is already highly complex.
@theshahbazahmad Жыл бұрын
Brother you solved many of my doubts. You have no idea how helpful and important these kind of videos are for me. Keep making such videos. Full support mate!
@ByteGrad Жыл бұрын
Glad to hear that
@darklord9500 Жыл бұрын
@@ByteGrad Thank You Brother 🙏
@bushbuddyplatypus10 ай бұрын
I am a grumpy and impatient senior dev who was soothed by your calm voice and clear explanations. Also learnt a few things. Thanks.
@AveN7ers Жыл бұрын
Man after learning Solid and Svelte, I'm starting to find React to be so convoluted.
@DEVDerr Жыл бұрын
Because it always was. Even with better alternatives (Solid and Svelte as you've mentioned... and more), to this day so many React devs are living with a React copium
@gamevidzist Жыл бұрын
It is
@Angeal98 Жыл бұрын
@@DEVDerrit's not copium, I just want an existing ecosystem of packages. Component libraries, styling solutions, utility components, specific solutions libraries etc. They all exist for react and not svelte nor Solid
@ColossalMcBuzz Жыл бұрын
@@DEVDerr They aren't living with copium, they're living with jobs.
@Salantor Жыл бұрын
@@Angeal98 You can always search for general, not tied to frameworks solutions. Those exist and there is quite a lot of them.
@Bukosaure Жыл бұрын
I am now quite experimented with React and already knew everything you covered in the video. But I still want to say that this video is pure bomb. The amount of useful information contained in it is quite impressive and really straight to the point. I would have love to have seen it about a year ago. :)
@ByteGrad Жыл бұрын
Haha thanks, appreciate it
@Endrit719 Жыл бұрын
same here, I just came to see the content but it's really helpful for the beginners, at some point I was making all these mistakes
@SSG_GAMING_000 Жыл бұрын
@@Endrit719 Us bro us.
@aleksandrS389411 ай бұрын
For me, as a backend developer it’s a pure gem. Everything I should keep in mind in a one video. So easy to refresh knowledge when I had to make some UI parts.
@__im.omer__4 ай бұрын
yep
@alessandrospiridigliozzi7943 Жыл бұрын
One of the best videos on React!!!! I've been working as a dev with react for over 1 year now and there were a lot of things in this video that I did not know! Most online courses never fully explain what happens underneath the hood, so thank you!!!
@positronalpha Жыл бұрын
I've been developing JS for 25 years, so I'm not really making the mistakes you list, but I'm only two weeks into React and this was a great crash course on its basic mechanisms. Between the lines, you managed to make it much more clear than the horrible hand-wavy official documentation which reads like it was written by people who don't know the basics of the language.
@IgorYatskiv11 ай бұрын
Do you like hooks overall? I'm around 15 years into JS development. But I hate functional programming with all that half/solutions. Why would anyone prefer functions over better structured, more clean classes (long awaited) syntax and OOP approach in general? 🤷♂
@rayaqin11 ай бұрын
@@IgorYatskiv I started React development when hooks were not yet available, and I like this new functional approach much more. I very rarely have to resort to creating any classes in very special cases.
@positronalpha10 ай бұрын
The way I see it, classes in JavaScript and TypeScript are a less-than-useful hack that don't work in any way like I'd expect. For me, the simplicity of prototypal inheritance, functions and closures are the beautiful bits of the language. That said, I think the state of the JS/TS ecosystem is really sad and avoid it whenever possible, even though I love writing JavaScript.
@raves_r31777 ай бұрын
I am a self-learning newbie in React and you sir just made learning React a lot easier! Simple, straight to the point, no unnecessary stuff. The time I saved by watching this video instead of scouring the docs is priceless. Thank you very much.
@rushboy1971 Жыл бұрын
Absolutely fantastic video. As a kinda newbie to NextJS and REACT, I was happy that I'd figured out most of these on my own, but some of them (the object item name in brackets trick) will really help get my code leaner.
@personal3314 Жыл бұрын
You somehow have managed to address every one of my concerns or gaps I believed I had in my knowledge across all your videos on react and Javascript. Thank you 🙏
@lukas.webdev Жыл бұрын
That's awesome!
@crizwiz489 Жыл бұрын
I really love how direct and precise it is with handle certain react problems. Please do more of this format of videos.I learnt a lot and I appreciate you man. Keep it up
@retagainez6 ай бұрын
If React devs are still having trouble initializing variables/state, boy... am I concerned.
@tanis6371Ай бұрын
Ok senior
@dimarifai72138 күн бұрын
One of the best videos out there! Definitely going through all of the other videos! The tone of your voice is also relaxing!!
@JoshSmith-sr6ksКүн бұрын
I'd been writing handleChange functions very similar to your example on the 3rd clip without fully understanding the syntax. I know the point of that clip was different but it really helped me understand what my handlers are really doing.
@oru8185 Жыл бұрын
The first case actually helped me a lot! At my job I was fixing a bug and couldn't figure out why component state was behaving wierdly, tourns out it was the multiple setState (although not direct) calls in one useEffect that were the problem
@darthvader489911 ай бұрын
Fantastic video. Just bought your professional react and nextjs course
@ByteGrad11 ай бұрын
Awesome, thank you!
@amir7440 Жыл бұрын
A bit of advice, if you don't want to get stuck with stale states when you're updating your state based on the previous state, always use callback function instead of a raw value inside your updater function. Get used to it and this will save you a lot of time.
@AlexanderSuleymanovFX Жыл бұрын
Thanks for the tip. Can you do a code example?
@orere1635 Жыл бұрын
@@AlexanderSuleymanovFX I think what he means is the solution found in the video at: 38:23 setCount((prev) => prev + 1) instead of setCount(count + 1)
@Adventures_English Жыл бұрын
@amir7440 to your knowledge are there other cases where not using a callback when setting state presents an issue? Or is this just limited to useEffect?
@amir7440 Жыл бұрын
Stale state can happen anywhere, for instance, assume a situation where you have to update your state twice or more in one single handler function. In this situation you should use callback instead of a raw value, because you will not get access to the fresh state unless you use callback. Just keep in mind that we have a so called batching state updates in this particular situation where react will update all of our states in one go (in one render), so we have to enforce react to use the freshest value on each state update. As I mentioned in my first comment, when you want to update your state based on it's previous value, always use callback and you're good to go.
@AlexanderSuleymanovFX Жыл бұрын
@@orere1635 Thank you!
@kalasii-11 ай бұрын
In the first section, I think it's important to point out that the setCount function call isn't really being "scheduled". What happens is the function is run top to bottom (it renders the component), and the handleClick function is loaded and attached to the button with the current value of count. When the button is clicked, count is the same for all calls of setCount. For example, if you put a loop inside the handleClick function that takes 5 minutes to complete in between two setCount calls, one button click will still result in a single increment. Promisifying and awaiting has the same effect.
@Cmacu10 ай бұрын
Thanks for saying this. This and some of the other explanations and examples in this video are very misleading and sometimes even flat wrong. It’s crazy how many people are just admiring the effort and taking it at face value without noticing the mistakes/problems. Another obvious example is the explanation about fetching data in useEffect without addressing the asynchronous nature of the fetch api and including practically required concepts such as async/await… There are other bad examples such as the resize listener which if declared as per the example will clear all resize listeners across the whole application and etc. I can keep going, but essentially almost every single example in this video has an issue. And we wonder why junior developers make such mistakes… because they watch videos like this one which demonstrate one type of error only to replace it with another…
@ahmadfiqri3339Күн бұрын
your explanation is crystal. thank you so much.
@Madesh-qf6qn14 күн бұрын
i recently completed my learning in frontend with react and built some basic projects. Decided to watch this 45mins video and i must says its worth it. All the things i have faced in my projects are covered and conveyed in a clever way.
@phucnguyen0110 Жыл бұрын
I gotta thank the algorithm for recommending me this video, Wesley! You solved so many things that I was curious in the past! And with Udemy having a big sales event atm I might just grab both of your CSS + JS courses!
@Digitalknifeparty Жыл бұрын
Likewise. Video has been helpful. I have several years of experience with JS, CSS, HTML, etc, but only been using React for 6 months or so. Just learned about using Vite over CRA the other day 😅 Hopefully I can land a React job soon!
@RalfSchlindwein0 Жыл бұрын
As a rookie reactjs developer i skipped many fundamentals and jumped straight to the code. Now i see how such concepts was important. thx for your time doing such a helpful video.
@shilpas-w6wАй бұрын
This is an amazing video! You made it simple, easy to follow, and explained everything so clearly. Thank you so much!
@bennzeppelin Жыл бұрын
Nice touch flipping the video as you move from editor to console 😄 Very helpful vids thx
@elidonmorina Жыл бұрын
Great one! Straight to the point, typical and practical life examples! Keep it up and the volume a bit up for the future videos haha
@X-Bit-Gits4 ай бұрын
I'm a senior dev but very new to React and modern JS. This was very helpful in showing more idiomatic ways to go about things. Thanks for a great video!
@saputrauta09 Жыл бұрын
you are a great teacher!, thanks!
@김아진-f5c10 ай бұрын
이야 강의가 너무 기가 막혀요🥰👍 궁금했던 부분을 시원하게 긁어주는 기분이네요 감사합니당
@simonaerts2926 Жыл бұрын
Nice video! Regarding the conditionnal rendering I would add to be careful with using it with numbers, for example: 0 && Hello will return the p tag, as it is not a falsy value for JS.
@amyrithe Жыл бұрын
0 is falsy in js
@coolme743710 ай бұрын
Great tutorial! Can you please come up with a 2nd part of this video?
@Lalit-yw2tb Жыл бұрын
I learnt all these things by trial and error while using react in my project. This is such a brilliant video that is going to help any new developer starting with react/nextjs to avoid the pitfalls. This video is jampacked with information. Such an amazing channel.
@lucasa8710 Жыл бұрын
quick counter point on the 8:01 topic, using a single object to store the state of all the inputs will produce a lot of objects, the garbage collector will run more times and the component will update all the inputs that depend on the `useState` which can, some times, reduce performance significantly. By using separate states your component will update way less and create less objects and use less garbage collection cicles
@krvns Жыл бұрын
This is 46 minutes of pure gold! Thank you!
@rootsyn5 ай бұрын
This video sold me to buy your courses, no faffing, straight into it with clear explanations with pros and cons and solid examples, Im a senior dev, 12 years and just this taught me a lot, cant wait to start the courses tomorrow
@ByteGrad5 ай бұрын
Awesome, enjoy!
@yell446022 күн бұрын
I really enjoyed the video it is fast yet clear and concise about the details. While watching I was thinking about my previous works and realizing what went wrong and now I learned a lot. Thank you!
@gowthamprakaash14092 ай бұрын
Very useful👏. Especially 14:05 this section, I have been doing unnecessary hooks all my life!
@snakesoul Жыл бұрын
As a learning developer, I run across hundreds of baity videos, but this one was really useful
@411sev Жыл бұрын
A well presented tutorial. Concept are explained very clearly with very short but good examples to facilitate understanding. Thank you very much.
@blarvinius2 ай бұрын
Good stuff. I appreciate the digressions into language and syntax details. So many tutorials folks just let a code example stand on its own, and well, it's all connected.
@count_of_pizza Жыл бұрын
Not only Junior React developers but also mids, so called seniors and all kind of full-stacks who have no idea about JS. Fantastic video :)
@user-pe4ie9zc1d10 ай бұрын
best And helpful video so far.....
@pradneyaprabhudesai24311 ай бұрын
As a beginner in React , I can confidently say that this video is a must watch
@john_dren Жыл бұрын
I finally understood the relevance of the spread ... operator with your real world example. Thanks to you
@goodtimeswerehad10 ай бұрын
Fantastic video! First one of yours I've come across (thanks KZbin). I'm now a subscriber
@EnavSounds25 күн бұрын
The video is great. You really fast tracked me into the react shenanigans. Also how did you edited the video? Are you using something automatic to cut the silent parts?. The end result is great, the video feels like is going 2x and keeps me engaged at the same time. You have my like and sub.
@vijay_explorer3 ай бұрын
Thank you so much for this awesome explanation!! Just the video I was looking for :)
@aadispare3673 Жыл бұрын
The best thing happened to me in recent times is your video popping up on my youtube homepage suggestions. So much clarity and valuable information. Subscribed and will surely recommend your channel to every React dev in my circle
@GuardingPearSoftware5 ай бұрын
Awesome video! Thank you very much!
@DeffQ4 ай бұрын
I like this way of explaining. Focusing on one thing at time. Using simple examples that are easy to understand. Nice!
@hcorazao14 ай бұрын
Im a senior angular developer preparing for a react technical interview and this video helped me a lot. Thanks for the dedication
@Imam.Mehdi_ Жыл бұрын
Brilliant,,, very concise video ,, keep going make full course on react js
@seelvek65502 ай бұрын
Great video! This is a really genuine video. I really like how you explain real world scenarios, and not just regular stuff. I also watched your Prisma guide, and this type of videos are really helpful. Thanks Wesley!
@hannes6444 ай бұрын
Great Videos! And so fast and detailtrue. Just amazing. You are the first where it was not needed to speed up the course.
@maurov2104 Жыл бұрын
This video shows how counterintuitive React is!
@codefrite Жыл бұрын
Incredibly dense content full of nice tricks, best practices and clear concepts explanations. It felt like learning "the right way" of coding things in modern JS. This is the first video I watch from you and it made me buy your Udemy JS course. I'll be spending the day watching it. Looking forward for a TS course :) Cheers from Belgium !
@romaneaugustin246211 ай бұрын
Thx for the comment. I should look for his course online. I always study javascript with Stephen Grider; thought he was the top dog.
@TheCodeHunter8 ай бұрын
as a junior dev, this video certainly helped me solve a lot of issues I had with my code, thank you!
@jegadheeswarank62909 ай бұрын
It's really really amazing content
@Namespace_Manny Жыл бұрын
I just got through a week of useState and useEffect, and this video helped answer a lot of questions. Keep it up man!
@stavroskefaleas6320 Жыл бұрын
This guy is a rock star tutor!Amazing video!
@mj2758 Жыл бұрын
Please more of this with other hooks. Thank you so much
@hazadam4 ай бұрын
This is some good stuff 👌. But I think it could be helpful to clarify that at around 35:00, when your "count" is not being incremented by the closure in setTimeout, it's simply because the closure has closed over a "const" variable which will always have the value of 0, it's not that variables are "created" once along with the closure, or that javascript would pass them in "by value". Simply the value of that variable, that was closed over, is unchanged (const). If it wasn't that case and that variables value would indeed change, the closure would know and you'd see the count incrementing. It may be worth mentioning that not all languages are like that, for example in PHP, closures actually are being passed primitive type variables by values 🙂
@tigranharutyunyan767411 ай бұрын
Fluidity and conciseness. Thanks!
@mikro_rimoslav9 ай бұрын
11/12 - If you still need to call hooks only if a certain condition is met (like on 03:24), which is often the case in practice, you can: 1) return "No id provided" if there's no id 2) copy and paste the code between the lines 6 and 11 into a separate component in which you call those hooks indiscriminately. 3) return that component instead of lines 6-11.
@ОленаНехрищинюк4 ай бұрын
You are really good at teaching. There are lots of good develovers, who create useful content but you are the best among them in tutoring. Very consistent, not emotional, focused only on confusing stuff. I am amazed
@ansonwoohk1984 Жыл бұрын
Thanks! Great for me as a new React Developer from Angular
@dandheedge Жыл бұрын
It's always so good to get a basic understanding like this!
@tanis6371Ай бұрын
Thank you bro. This video was really helpful for me and made me think some things for my futures coding moves
@RoyiaiHackersChristo Жыл бұрын
Amazing. I made all of these mistakes when I started with React some years ago. Hope every React beginner's can watch this.
@albertgouws13 Жыл бұрын
Great video especially the pace at what you presented. It was 👌No time wasting and just kept going.
@mikeh8498 Жыл бұрын
Great video. These quick reminders are very helpful! Especially because you often see multiple ways of doing the same thing but no one explains why it works.
@alexandergrigoryan3359 Жыл бұрын
this video is a pure gold for any React developer, junior and intermediate
@nstha88487 ай бұрын
17:00 best explanation
@spookyskellyskeleton60910 ай бұрын
thank you, I was overusing useEffect in some cases. If possible can you make a video in detail specifically for this case
@basmong Жыл бұрын
I like that all the details are also discussed. Great video.
@Adventures_English Жыл бұрын
I watched all the other KZbinrs and their covering of these similar topics. You by far do it the best!
@AndyThomasStaff4 ай бұрын
37:55 is really bad, it's not an interval, because every time you set the state it clears and sets a new interval. What a junior mistake!
@keithlamontdavis8047 Жыл бұрын
This is extremely helpful. Thank you!
@lukas.webdev Жыл бұрын
I agree! 😉
@AlexanderMihailov-tx8pk Жыл бұрын
[2/12] while cleaning Intervals is kinda ok you can also use setTimeout in that specific example. Apart of real "prev" solution ofc
@VictorSilvaDev Жыл бұрын
I like how you go straight up to the point. Great video. +1 subscriber
@rubenramirezdev Жыл бұрын
Thank you for this video. #9 really helped me out!
@shikhabhatt71812 ай бұрын
This video is really helpful. Would love to see more of such videos coming.
@DeepakVerma-xl9wx7 ай бұрын
I am now experienced React developer and this is the must watch video for every React developer , hats off and really appreciate you for this video .
@ByteGrad7 ай бұрын
Thanks! Enjoy
@kashmirtechtv2948 Жыл бұрын
Create more videos like this.... These are the best bcz these concepts and mistakes developers interact with in their coding daily.
@Larriisama8 ай бұрын
This was really helpful, I recognize a few mistakes I've done and though I've worked around the errors, your explanations gave me a better understanding to why I saw errors or such. Really cool vid and most of all thanks for sharing. I've just recently gotten serious about next.js but before that I used to fetch data in a useEffect much like you said
@indrajitadhikary6989 Жыл бұрын
With this video I lerned more in an hour than what I learned in one and a half day searching. Thanks!
@timkoprivnik987511 ай бұрын
really, really good explanation of everything! thanks a lot for that video. would love to see more.
@funkerosupremo Жыл бұрын
As I was watching, there was this sudden urge to like the video multiple times, even though i'd already liked before. Learned a lot, thanks!
@hskdjs7 ай бұрын
38:34 If you leave it as is, your "setInterval" would never be canceled until you close or reload the page. If you call setInterval or setTimeout inside useEffect, always destroy that interval / timeout.
@chhavimanichoubey9437 Жыл бұрын
these tips are what every dev need right now.
@puopg Жыл бұрын
For the last one, tbh I would just use a debounce with no leading trigger. Since then no network call goes out and only fires once you’ve “settled” This way you never hammer ur server until the user has essentially stopped
@tek9ine130 Жыл бұрын
Can you elaborate a bit on how you would achieve that in Nextjs?
@puopg Жыл бұрын
Errr, this isn’t a framework thing, just javascript. Say you just use lodash.debounce, it would basically just be Const myDebouncedFn = _.debounce(myFn, 250, { leading: false }); And then just swap the method out in this case for the video
@codemonkeybusiness Жыл бұрын
My thoughts exactly. Either that or disable the button while the HTTP call is running
@lakhvinderdhillon1882Ай бұрын
Thank you dude!!! I lt was solid learning lesson.
@LaniakeaArmstrong Жыл бұрын
The 7th error would have taken me to long to solve, ty.
@osamaxz57209 ай бұрын
thanks so much for sharing this info for free because I never saw a free course giving like this useful info. You are from the rare people man ❤
@eddiegere10 ай бұрын
Amazing video with valuable information. Thank you.
@michaelirwin7258 Жыл бұрын
I started my react journey a year ago or so. I’ve made these mistakes. It’s nice a year later for me to say, ‘not this time. I know better now…’
@juanmamani21107 ай бұрын
the best 46 minutes of the day! thanks for sharing....