Make React Easy With These 5 Custom React Hooks

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 52

  • @Danhosaur
    @Danhosaur 2 ปีที่แล้ว +54

    I wonder Kyle, are you planning to make this into an npm module? I can imagine that all these hooks would be really nice in a wds-hooks module or something similar.

    • @theory813
      @theory813 2 ปีที่แล้ว +1

      Checkout the module "react-use"

  • @zo5esi4i57
    @zo5esi4i57 2 ปีที่แล้ว +2

    amazing how this comes out right after I finish watching the first two parts, thanks Kyle

  • @tomasvidal424
    @tomasvidal424 2 ปีที่แล้ว +1

    wonderful! Actually this is one of the this that i love about React. The ability to composite smaller pieces of code to make something much bigger it's amazing.

  • @TheRavageFang
    @TheRavageFang 2 ปีที่แล้ว +2

    Regarding the intersection observer it's best to reuse same obeerver instance in case same hook is used in a list or on multiple elements, but it's ok if there aren't that many usages on the screen.

  • @jr-hp7er
    @jr-hp7er 2 ปีที่แล้ว +1

    Going through the entire series, its mind blowing :)

  • @user-fg6ng7ej6w
    @user-fg6ng7ej6w 2 ปีที่แล้ว

    very cool series, thanks. helped me to grasp hooks. official react docs as of 2022 are very concise on this topic.

  • @ethiocode298
    @ethiocode298 2 ปีที่แล้ว +6

    please kyle show us how to test react apps with sample project

    • @kiryu9711
      @kiryu9711 2 ปีที่แล้ว

      Yeah that is definitely a video I would like to see

  • @DidouSchol
    @DidouSchol 2 ปีที่แล้ว +1

    Really love how you go straight to the point. I feel like revisiting a few projects that could really benefit from using hooks that I hadn't even thought of... Thank you for all this insight, really helpful.

  • @gigapist2415
    @gigapist2415 2 ปีที่แล้ว +4

    This is the only channel that makes me click on the newest video instantly

  • @jayharsh1
    @jayharsh1 2 ปีที่แล้ว

    This kind of videos makes me wonder that I know nothing........plus gives me a way to look forwards to more and more learnings. I always wait for you videos and I hope that your react advanced course also comes out soon...awaiting for this..

  • @jeresalem
    @jeresalem 2 ปีที่แล้ว +1

    Great stuff, but why are this not written in TypeScript after all the praises you give to it 😤

  • @tw04
    @tw04 2 ปีที่แล้ว +1

    You are making me to love React again!

  • @wadedoto
    @wadedoto 2 ปีที่แล้ว +1

    Cant wait for useProtection to avoid bugs

  • @adnanahad
    @adnanahad 2 ปีที่แล้ว

    I am watching your all videos...
    But this video will be watched tomorrow...its night in india...goot night

  • @megapixel23
    @megapixel23 2 ปีที่แล้ว

    Awesome content, as always!
    Btw, do you have any content on the Observable/RxJs?

  • @hilex2368
    @hilex2368 2 ปีที่แล้ว

    Hi Kyle, I recently stumbled into your channel and I have to say that I love your videos! I have a question: how do I make a button open a web page when someone clicks on it?
    I'm trying to set up my first website so I'd appreciate your answer :)
    Thanks.
    Edit: I solved it by myself but I have another question. How can I change the URL of the website I just created? I don't want it to be just weird numbers.

  • @ahshawon879
    @ahshawon879 2 ปีที่แล้ว

    no one can make me understand things as soon as you can💝💝

  • @nestord1348
    @nestord1348 2 ปีที่แล้ว

    why is the useEventListener callback on a ref? , why not treating the callback the same way as eventType and element?

  • @NotBeHaris
    @NotBeHaris 2 ปีที่แล้ว

    Please make a video on custom hook in which we submit form by passing data and url.

  • @gigapist2415
    @gigapist2415 2 ปีที่แล้ว

    Can you do a video on how to work with axios?

  • @ythuang1342
    @ythuang1342 2 ปีที่แล้ว

    Hope some recording for react-native from this guy. Ex: socket in react-native 👀

  • @hurleywflow2227
    @hurleywflow2227 2 ปีที่แล้ว

    Thanks 🙏🏼

  • @JuanPabloKutianski
    @JuanPabloKutianski 2 ปีที่แล้ว

    Kyle. Where do you think is a good place to put the custom hooks? /src/utils/hooks or /src/hooks maybe?

    • @Will4_U
      @Will4_U 2 ปีที่แล้ว

      Personally, if a certain hook is used in multiple components, then I would put it into the/src/hooks folder.
      For example - if I have a Home component, then all hooks related to this component would be in Home.hooks.js/ts (depends if you are using TypeScript).

  • @YuriiKratser
    @YuriiKratser 2 ปีที่แล้ว

    Thanks bro!

  • @tatheermehdi9574
    @tatheermehdi9574 2 ปีที่แล้ว

    bro cover the basics of mern stack and then how to combine that all.. Love from Pakistan..

  • @ridl27
    @ridl27 2 ปีที่แล้ว

    fuck yeah! so good! ty Kyle! love ya, love react, love hooks, hate angular!

  • @captainalpha4853
    @captainalpha4853 2 ปีที่แล้ว

    can you do this kind of videos with nodejs / express?

  • @marimuthur9456
    @marimuthur9456 2 ปีที่แล้ว

    Kyle can I import external script file using useScript hook is this possible🤔

  • @youtubewts
    @youtubewts 2 ปีที่แล้ว

    Have you considered doing any Vue JS content or if you're less familiar with it your journey to pick it up?

    • @Will4_U
      @Will4_U 2 ปีที่แล้ว

      He said at the beginning of the year that he wants to learn TypeScript and Next.js in the fourth quarter of the year.
      I sincerely doubt he would be interested in anything else.

    • @youtubewts
      @youtubewts 2 ปีที่แล้ว

      @@Will4_U It's probably for the presenter to reply on that if he picks up this comment.

  • @pranavbhat29
    @pranavbhat29 2 ปีที่แล้ว

    1:19 It would also be a good idea to remove the event listeners on resolve or reject at the "load" or "error" events on the script element, something like
    const script = document.createElement('script');
    script.async = true; // also why not defer over async?
    script.src = url;
    return new Promise((resolve, reject) => {
    let onLoad, onError;
    const removeListeners = () => {
    script.removeEventListener('load', onLoad);
    script.removeEventListener('error', onError);
    onLoad = () => {
    removeListeners();
    resolve();
    };
    onError= () => {
    removeListeners();
    reject();
    }
    script.addEventListener('load', onLoad);
    script.addEventListener('error', onError);
    document.body.append(script);
    });
    Thoughts?

    • @InstituteOfIndependence
      @InstituteOfIndependence 2 ปีที่แล้ว

      const onError= (e:any) => {
      removeListeners();
      script.remove();
      reject(e);
      }

  • @tomyyoung2624
    @tomyyoung2624 2 ปีที่แล้ว

    Yes data on my phone. im in whitby,on

  • @user-kr6lp7rm5y
    @user-kr6lp7rm5y 2 ปีที่แล้ว

    5:35 I don't understand. Its not save from rerender

  • @yadneshkhode3091
    @yadneshkhode3091 2 ปีที่แล้ว

    hello sir,
    can you please make roadmap type videos for react node express mongo
    for eg:
    React:
    internal working of react - diffie algorithm etc how trees are compared internally etc
    learn class components
    life cycle of class components
    functional components
    hooks
    HoC , Error handler component, etc
    step by step guide of only topics 1 should know

  • @global-accidents
    @global-accidents 2 ปีที่แล้ว

    show the useAsync source code plz

  • @khizrshaikh9902
    @khizrshaikh9902 2 ปีที่แล้ว

    Edit: Oops It becomes 4th
    3rd comment I want heart

  • @TheBorninmotion
    @TheBorninmotion 2 ปีที่แล้ว

    waiting for vue tips and tricks !

    • @josephtan6018
      @josephtan6018 2 ปีที่แล้ว +2

      no. react is better

    • @aammssaamm
      @aammssaamm 2 ปีที่แล้ว

      @@josephtan6018 Same s..t.

    • @TheBorninmotion
      @TheBorninmotion 2 ปีที่แล้ว

      @@josephtan6018 over hyped drug

  • @sruthilal6586
    @sruthilal6586 2 ปีที่แล้ว

    How to be good in react ?

    • @aammssaamm
      @aammssaamm 2 ปีที่แล้ว +1

      How can you be good in something which is not good by design?

  • @sandeeptottadi
    @sandeeptottadi 2 ปีที่แล้ว

    Carrier fair ❤️

  • @adnanahad
    @adnanahad 2 ปีที่แล้ว

    First comment

  • @anshumanxda
    @anshumanxda 2 ปีที่แล้ว

    kyle > eminem

  • @aammssaamm
    @aammssaamm 2 ปีที่แล้ว

    What a mess.