Ian Lenehan
Ian Lenehan
  • 35
  • 343 833
The Dangers of Overusing React State
State in React is so powerful, but we often use it in places where we shouldn't! In this video I'll give you an example of when using state is a bad idea and what you can do instead.
Learn React with Zero to Mastery: bit.ly/il-learn-react
Intro: 00:00
Why state is bad: 00:15
What to use instead: 01:53
Summary: 09:13
มุมมอง: 752

วีดีโอ

Loading data in React Router using the new useLoaderData hook
มุมมอง 8K2 ปีที่แล้ว
I am really excited about using React Router 6.4 in production apps because they have introduced some really neat features that are already available in Remix. In this video we just look at the useLoaderData pattern and how it can make constructing React components so much simpler. My Remix tutorial: th-cam.com/video/SmMqdF2v30s/w-d-xo.html Learn React with Zero to Mastery: bit.ly/il-learn-reac...
How to build elegant React forms with React Hook Form
มุมมอง 91K2 ปีที่แล้ว
You don't need a form library to build forms in React, but if you need to build anything beyond the very basic form, you're going to want a form library once I show you how React Hook Form works. Zero to Mastery courses: academy.zerotomastery.io/a/aff_6tnzgy7w/external?affcode=441520_zdvlwjnl Converting from Create React App to Vite: th-cam.com/video/YT35buXMgL8/w-d-xo.html What is Vite?: th-ca...
5 Power Moves for Junior Developers
มุมมอง 5052 ปีที่แล้ว
Today I go through the five things I wish I had known before getting into programming. I hope these five things will help you on your journey! Zero To Mastery courses: academy.zerotomastery.io/a/aff_6tnzgy7w/external?affcode=441520_zdvlwjnl How to get a job as a web developer: th-cam.com/video/Lx_yHXIY4kU/w-d-xo.html
Converting to Vite from Create React App - lower your boot time to almost nothing!
มุมมอง 20K2 ปีที่แล้ว
Why Vite: th-cam.com/video/-KEuTPIpLbE/w-d-xo.html Written tutorials I used: craftsmenltd.com/blog/2022/06/23/migrating-your-create-react-app-project-to-vite/ www.darraghoriordan.com/2021/05/16/migrating-from-create-react-app-to-vite/
Refactoring smelly old React code!
มุมมอง 3.2K2 ปีที่แล้ว
Watch as I refactor older React code that I wrote a couple of years ago.
Vite vs Create React App / Webpack, Vite and ESBuild explained.
มุมมอง 14K2 ปีที่แล้ว
It's time for me to move on from using Create React App to build my React Apps. Vite is the new kid on the block and can be used to spin up a React app in a flash. In this video I explain the differences between the two and why I think Vite is better. I also talk about what Webpack is, and how it differs from Vite and ESBuild. Building Tic Tac Toe with Vite: th-cam.com/video/MRe-5nVBPRo/w-d-xo....
Learning React, Typescript, Tailwind and Vite with Tic Tac Toe
มุมมอง 9K2 ปีที่แล้ว
In this video I am building a Tic Tac Toe clone using some of the hottest web development tools available today. We are building the app in React, with Typescript as the language, Tailwind for CSS and the blazingly fast Vite build tool. You don't need to know how to use any of these tools well, if at all, so follow along and let me know if you have any questions! Check out the final code here: ...
Get started with Javascript
มุมมอง 3832 ปีที่แล้ว
In this video I will go over the basics of Javascript. What are strings, booleans, functions etc? It's essential to understand what these are and how to use them as you are learning Javascript. Chapters 0:00 - Intro 1:20 - Numbers 2:35 - Strings 3:25 - Booleans 3:39 - Variables 7:54 - Arrays 11:34 - Objects 14:51 - Comparisons 20:36 - Window interactions 22:39 - Functions 28:48 - Wrap up
Add amazing autocomplete to your Terminal with Fig
มุมมอง 16K2 ปีที่แล้ว
One you starting using Fig in your terminal, you'll wonder how you ever managed without it! Fig Autocomplete adds VS Code style IntelliSense to your terminal which gives you auto complete as you type.
Try these in your next Javascript project!
มุมมอง 3172 ปีที่แล้ว
I'll take you through 5 really cool web apis available in the browser that you can use in any Javascript project! All Web APIs are listed here. Make sure to check browser availability! developer.mozilla.org/en-US/docs/Web/API
Become a web developer in 2022!
มุมมอง 6232 ปีที่แล้ว
It can be daunting trying to work out how to get that first job as a software developer or web developer in 2022. In this video I talk about the main ways you can achieve this, from university, coding bootcamps to self taught. Build your own Wordle Clone: th-cam.com/video/j7OhcuZQ-q8/w-d-xo.html How to keep up with web development trends: th-cam.com/video/HKfH2V8ishg/w-d-xo.html Setting up your...
Using a Wordle clone to understand local storage in Javascript
มุมมอง 4.9K2 ปีที่แล้ว
The last video I did was how to build a Wordle Clone with Javascript, HTML and CSS. To save time we left out keeping statistics and maintaining the game state, but in this video we pick up there and go in-depth into how to use local storage in Javascript to do just that. Source code: github.com/ianlenehan/wordle-clone/pull/2 Wordle tutorial pt 1: th-cam.com/video/j7OhcuZQ-q8/w-d-xo.html
Build a Wordle clone using HTML, CSS & Javascript!
มุมมอง 44K2 ปีที่แล้ว
Wordle is a simple word game taking the world by storm! In this video we wil build a Wordle clone using HTML, CSS and vanilla Javascript. We'll also use an API to get a new word and check if a guessed word exists. Finished code: github.com/ianlenehan/wordle-clone Add local storage for stats and game state in Wordle: th-cam.com/video/lF4O1wvyVow/w-d-xo.html Video explaining REM in CSS: th-cam.co...
Remix & Firebase - using Firebase Auth and Firestore with Remix
มุมมอง 10K2 ปีที่แล้ว
Remix & Firebase - using Firebase Auth and Firestore with Remix
Is this LG Ultrawide the Perfect Monitor for Programming?
มุมมอง 61K3 ปีที่แล้ว
Is this LG Ultrawide the Perfect Monitor for Programming?
12 VS Code extensions for 2022
มุมมอง 3.6K3 ปีที่แล้ว
12 VS Code extensions for 2022
Remix Tutorial | Trying out the newest React Framework!
มุมมอง 5K3 ปีที่แล้ว
Remix Tutorial | Trying out the newest React Framework!
I don’t need a computer for coding anymore!
มุมมอง 3503 ปีที่แล้ว
I don’t need a computer for coding anymore!
5 things you should be doing in your React projects!
มุมมอง 3683 ปีที่แล้ว
5 things you should be doing in your React projects!
Saving the Oceans with React Native, Expo, Mark Rober & Mr Beast! #TeamSeas
มุมมอง 1233 ปีที่แล้ว
Saving the Oceans with React Native, Expo, Mark Rober & Mr Beast! #TeamSeas
How to create an amazing Github Profile Readme | Use this when looking for a job as a web developer!
มุมมอง 1.4K3 ปีที่แล้ว
How to create an amazing Github Profile Readme | Use this when looking for a job as a web developer!
Keeping up with the latest web development trends
มุมมอง 3033 ปีที่แล้ว
Keeping up with the latest web development trends
Recoil Tutorial | React State Libraries
มุมมอง 18K3 ปีที่แล้ว
Recoil Tutorial | React State Libraries
Learn React Context in under 15 minutes!
มุมมอง 7223 ปีที่แล้ว
Learn React Context in under 15 minutes!
Stop using pixels in your CSS! How and why to use REM and EM.
มุมมอง 21K3 ปีที่แล้ว
Stop using pixels in your CSS! How and why to use REM and EM.
React Hooks Tutorial - Ideas for Custom React Hooks
มุมมอง 1343 ปีที่แล้ว
React Hooks Tutorial - Ideas for Custom React Hooks
React Hooks Tutorial - learn how to use React Hooks!
มุมมอง 913 ปีที่แล้ว
React Hooks Tutorial - learn how to use React Hooks!
How Google Broke the Web! (and Javascript's Weird Parts)
มุมมอง 553 ปีที่แล้ว
How Google Broke the Web! (and Javascript's Weird Parts)
Essential Slack Tips for 2021: How to navigate Slack like a pro!
มุมมอง 2K3 ปีที่แล้ว
Essential Slack Tips for 2021: How to navigate Slack like a pro!

ความคิดเห็น

  • @joshuadas6949
    @joshuadas6949 24 วันที่ผ่านมา

    Thank you for this !

  • @saifulislamriyad8071
    @saifulislamriyad8071 หลายเดือนก่อน

    best on internet

  • @chrishanthacosta4093
    @chrishanthacosta4093 2 หลายเดือนก่อน

    Informative, Ian.. Thanks

  • @MarcoLuz-b2f
    @MarcoLuz-b2f 2 หลายเดือนก่อน

    First link is not working anymore

  • @maxkosh4839
    @maxkosh4839 3 หลายเดือนก่อน

    17:09 I tried to wrap a separate Route with AppWrapper instead of all routes.. and it doesn't work.. Why?

  • @thomas_brewer
    @thomas_brewer 4 หลายเดือนก่อน

    Very nice walk-through. Cheers. 💪

  • @martinWein
    @martinWein 4 หลายเดือนก่อน

    So you migrated your entire app to save 13 seconds what about all the time it took to migrate the actual app???? as for me I will be sticking with react app for a very long time as I despise vite for too many reasons to count. watchers be warned. It is not a simple question when you realize you are no longer allowed to use a JS file and you are not being warned about unused hooks and you are damned.

  • @martinWein
    @martinWein 4 หลายเดือนก่อน

    .

  • @deadlycheesee
    @deadlycheesee 4 หลายเดือนก่อน

    holly molly homelander teaches recoil

  • @DavidMeddowsTaylor
    @DavidMeddowsTaylor 5 หลายเดือนก่อน

    Nice, but your algorithm to check the word and set the colors is a bit off. If the word is YODLE and you guess HELLO then you should not get {Grey, Yellow, Yellow, Green & Yellow} but instead it should be {Grey, Yellow, Grey, Green & Yellow}. The L exists in YODLE once, so only one of the L's in HELLO should have a color. Since one of them is Green, the other should be Grey. If the word were LABOR instead of YODLE then HELLO would have one Yellow L and one Grey L (it would be {Grey, Grey, Yellow, Grey, Yellow}). Each letter in the actual word should only apply a color to one letter in the guess. Once it has applied a color to the guess it should not be considered again.

  • @DavidChijioke-hc8ub
    @DavidChijioke-hc8ub 5 หลายเดือนก่อน

    very precise

  • @samhudson1169
    @samhudson1169 5 หลายเดือนก่อน

    Super succinct, no bloat. Easy explanation. Love it dude.

  • @hypothalamussounds7962
    @hypothalamussounds7962 5 หลายเดือนก่อน

    Thanks for this video, i was stuck in my learning due to this concept of em and rem and px, but you made just the right video as to why use them instead of px, i recommend this to other programmers.

  • @bigbitprods
    @bigbitprods 5 หลายเดือนก่อน

    Thanks for this! Any way to pull the words from a custom list so they can be inside jokes with friends?

  • @osamansr5281
    @osamansr5281 6 หลายเดือนก่อน

    [7:20] it's not so clear where is the Outlet component being used, but I think directly after the <nav> 😅

  • @_notanengineer
    @_notanengineer 6 หลายเดือนก่อน

    Is there any repo that you could provide with, please?

  • @Best11CricketTeam
    @Best11CricketTeam 7 หลายเดือนก่อน

    Thanks

  • @zevspitz8925
    @zevspitz8925 7 หลายเดือนก่อน

    Why do you define a separate async function within the loader functions? Couldn't you await awaitTimeout directly, then return the data?

  • @Best11CricketTeam
    @Best11CricketTeam 7 หลายเดือนก่อน

    Hi Lan I need your assistance to optimize react with Context api hook.

  • @hebertgodoy5039
    @hebertgodoy5039 7 หลายเดือนก่อน

    Thanks

  • @TheDorac1
    @TheDorac1 7 หลายเดือนก่อน

    And now, Recoil is dead.

    • @nics51
      @nics51 3 หลายเดือนก่อน

      mobx is the best stm

  • @videomaster5437
    @videomaster5437 7 หลายเดือนก่อน

    I cant even get the black border on top of the page and i followed every step

  • @alibarznji2000
    @alibarznji2000 7 หลายเดือนก่อน

    Hey, did you fix the CSS issue?

  • @OneBrokeBloke
    @OneBrokeBloke 7 หลายเดือนก่อน

    I get it for fonts, but for stuff like the containers/boxes in the video, wont we encounter issues like this potentially? I just cannot imagine it being maintainable/scaleable, that these boxes now have REM and will start colliding with eachother, as soon as the user starts increasing the font size?

  • @pedrosilva4342
    @pedrosilva4342 8 หลายเดือนก่อน

    so use rems, aight thanks

  • @ftblhd1
    @ftblhd1 8 หลายเดือนก่อน

    You also forgot to check something, if my random word was "yours" and my guessed word was "sense" it would check both S instead of only one of them so both would be yellow in this case, but only one should be.

  • @haroldguzman1285
    @haroldguzman1285 8 หลายเดือนก่อน

    Thank you very helpful 😉.

  • @JasonLayton
    @JasonLayton 8 หลายเดือนก่อน

    React hook form has wasted so much time for my team, we hate it. Debugging it has been terrible, as there are often no error messages in the console. Do you have any suggestions for how to deal with it when there are no error messages? When it happens, it is usually somewhere inside of handleSubmit (the code doesn't reach our submit function).

    • @IanLenehan
      @IanLenehan 8 หลายเดือนก่อน

      Hey yeah useForm returns a formState object which contains all the validation errors. Personally I use zod for validation with zod-resolver. As long as I pass each possible error to an error message in the UI, I know I’m covered.

    • @IanLenehan
      @IanLenehan 8 หลายเดือนก่อน

      The code won’t reach your submit function if it fails validation so make sure you handle those errors from formState and you shouldn’t have any more issues.

    • @JasonLayton
      @JasonLayton 8 หลายเดือนก่อน

      @@IanLenehan Thank you for taking the time to respond. Is there a point in your video where you handle formState errors? I'm not totally clear on how to go about that. Is there a way I can log it to the console?

    • @IanLenehan
      @IanLenehan 8 หลายเดือนก่อน

      Have a look here - you'll see how to get formState, which is an object, Inside formState is another object that contains all your errors react-hook-form.com/docs/useform/formstate. You can just console.log(formState.errors) I don't know how your UI is set up so I can't tell you how to handle errors, but it might be something like this <div> <Input name="firstName" /> <span style={{ color: 'red' }}>{formState.errors.firstName?.message}</span> </div> Or RHF have their own component you can use, here is how to use it react-hook-form.com/docs/useformstate/errormessage

  • @darshan5945
    @darshan5945 8 หลายเดือนก่อน

    Great and simple explanation. Thanks !

  • @whitewalkerCoc
    @whitewalkerCoc 8 หลายเดือนก่อน

    Great refactoring tip thanks.

  • @DiggyPowell
    @DiggyPowell 9 หลายเดือนก่อน

    How did you get the signIn/signUp to work within the action function? The Firebase "signInWithEmailAndPassword" is a client side function that you somehow got to run on the remix server. You have the cleanest code I've seen to date on React w/ Firebase, and I would love to see an update for 2024 because I cannot get this code to work in 2023/2024. Thanks!

  • @gavinbevan365
    @gavinbevan365 9 หลายเดือนก่อน

    Really good explanation, thanks for posting!

  • @paulp3053
    @paulp3053 9 หลายเดือนก่อน

    I also have my double person bed behind me. I'm lucky that my company never required video in meetings, but I was so much trying to hide it or blur it during interviews. But now I feel much encouraged since you have your bed in every video :)

  • @VivekGangwar02
    @VivekGangwar02 9 หลายเดือนก่อน

    what is width of the table you use?, I ordered 120cm ikea, thinking to changing it to 140cm atleast.

  • @kirillzlobin7135
    @kirillzlobin7135 10 หลายเดือนก่อน

    5:00 Install react hook form

  • @josecastaneda8082
    @josecastaneda8082 10 หลายเดือนก่อน

    This video really shows realistically how this process may look like. I just did a migration of CRA with typescript and it was not without some headaches. But worst of all was migrating jest tests to Vitest. I have 500+ tests in my solution. That took a couple of days of googling, rewriting and cursing. You can count on that you’ll need to rewrite some, as mocks behaves differently in vitest compared to jest, for example. Another one is different names on requireActual and jest.fn now being vi.fn etc. While it is faster with Vite and Vitest, you’ll notice that it is still not as mature as CRA, there is just less information to google about compared to CRA and Vite has its issues as well. I guess that it will get there eventually.

  • @andredutra9152
    @andredutra9152 10 หลายเดือนก่อน

    Nice one, but not even in the LG site at Brazil :(

  • @AnanthM-y7f
    @AnanthM-y7f 10 หลายเดือนก่อน

    13:12 create 3:41 db

  • @CadisDiEtrama000
    @CadisDiEtrama000 11 หลายเดือนก่อน

    For anyone facing this problem, I found most success just initializing a new Vite app, then just copy-pasting all the old files inside... Then you just need to adapt some of the config, App.tsx file, and you are basically done 👍

    • @adventurer2395
      @adventurer2395 10 หลายเดือนก่อน

      that’ll cause you to lose version history

  • @amna6760
    @amna6760 11 หลายเดือนก่อน

    thanks for this clear tutorial, I am facing problem with I have validation for specific field but i want the error show when user type wrong thing if it write and delete it or click on submit will not show the error, how can i reach that? thanks a head @IanLenehan

  • @neelnarwadkar5921
    @neelnarwadkar5921 11 หลายเดือนก่อน

    Great video! How do i manage multiple react-select inputs and also how to create a reusable react-select component along with react-hook-form

  • @hamdiaminehkh
    @hamdiaminehkh 11 หลายเดือนก่อน

    I went through the same process and the same steps; for 2 hours or more, I found myself changing imports, altering extensions, adjusting configurations, and so on without success. Eventually, I was compelled to cancel everything and revert to the React script. However, after watching this video, I feel encouraged to give the migration to Vite another try.

    • @dekafmusic
      @dekafmusic 6 หลายเดือนก่อน

      how did it go?

  • @3bood_kr
    @3bood_kr 11 หลายเดือนก่อน

    Good

  • @KobieK
    @KobieK ปีที่แล้ว

    I didn’t know Cristiano Ronaldo’s brother was a programmer

  • @trillyexcel8316
    @trillyexcel8316 ปีที่แล้ว

    Curious if anyone has found the optimal picture / display settings for a work environment? Currently on the standard "custom" mode, but wondering if anyone has found the best settings to set here

  • @dsinghr
    @dsinghr ปีที่แล้ว

    There is no mention of the monitor model anywhere in the video ?

  • @TheYinyangman
    @TheYinyangman ปีที่แล้ว

    That theme is punishing to the eye 🥹

  • @est737
    @est737 ปีที่แล้ว

    you say "without move my head" and you are literally moving it :D th-cam.com/video/uKLuEI-nwB0/w-d-xo.htmlsi=Udrd8jzePOW59Edx&t=213 And that's my main question about ultrawide and side by side windows... do you have to constantly switch my head. With dual monitor, the main one is where my head is always pointed at and the secondary I occasionally tilt my head. Btw a phisiotherapist suggested to move the side one from left to right every month or so to avoid neck strain.

  • @mauriciodurcak8539
    @mauriciodurcak8539 ปีที่แล้ว

    greeaaaattttt!!!!

  • @jaksamacanovic
    @jaksamacanovic ปีที่แล้ว

    The only problem with this monitor is that it has 60Hz. Is there the same model but with like 100-144 Hz?