HOC Pattern in React

Поділитися
Вставка
  • Опубліковано 10 лют 2025

КОМЕНТАРІ • 31

  • @thatbackbenchdude
    @thatbackbenchdude Місяць тому

    Guess what, I stumbled upon this same article, I was too lazy to read it so I searched HOC on youtube and now this guy is just helping me read it. what could be more easy than this 😆

  • @emanoelinfinity
    @emanoelinfinity 5 місяців тому +13

    This was just a reading. It would be interesting to have an explanation with more modern examples. Because this form is now considered a legacy.

  • @golden7877
    @golden7877 5 місяців тому +2

    Since i discovered your channel i add your name to every youtube search i do,you are simply the best react tutor on youtube, keep up these videos!
    A video idea that i would love to see frrom you is " Migrating to typescript in react" where you explain why we use react with ts and all that related stuff.

    • @cosdensolutions
      @cosdensolutions  5 місяців тому

      I have a JSX to TSX video actually! But will do more

  • @turgunov28
    @turgunov28 5 місяців тому +4

    thanks mate for great video :)

  • @bestformspielt
    @bestformspielt 5 місяців тому +1

    Another pro for HOC is that you separate the concern of receiving data from rendering that data which makes the component easier to write and test. I still would prefer hooks in almost all cases but I think this point should have been mentioned in the article.

  • @BinaryBridge
    @BinaryBridge 5 місяців тому

    A very good and informative content in a row

  • @vortexdeo4545
    @vortexdeo4545 4 місяці тому +1

    Ohh, so those {connect, mapStateToProps etc} from 'react-redux' are actually HOC for class component because hooks can be only technically used in functional components!
    Damn! In one of the interviews I couldn't explain why we expliclty need these since we can do that same thing with Hooks for some conditional rendering to wrap child component for that matter.
    Now i understand, so thanks

  • @coder_one
    @coder_one 5 місяців тому +8

    Reading this code without TS types is a torture....

  • @geforcesong
    @geforcesong 4 місяці тому

    seldom use this pattern

  • @regilearn2138
    @regilearn2138 5 місяців тому +2

    Please do a video on Render prop pattern

  • @gerasim_vol
    @gerasim_vol 5 місяців тому

    "Button" component needs to receive and use "style" prop

  • @Vladyslav.L
    @Vladyslav.L 5 місяців тому +20

    Bro literally reads an article on the video

  • @priopambudi9533
    @priopambudi9533 5 місяців тому

    Hi, thanks for your video. I want to ask, is your project React course covered about middleware?

    • @cosdensolutions
      @cosdensolutions  5 місяців тому

      Middleware isn't covered because we don't have a real backend! All of the data is mocked to make it easier for beginners to focus on the React part

  • @mister_n3510
    @mister_n3510 5 місяців тому +1

    nice video

  • @vigneshwaran456
    @vigneshwaran456 5 місяців тому

    Can you post a video about cross browser compatibility.

  • @Niamudeen
    @Niamudeen 5 місяців тому

    Can you do a review of my react project bro? I just want to know what things I am lacking to level up.

  • @strategistaow3520
    @strategistaow3520 5 місяців тому

    I want to test react app but i have "react router dom 6" i don't know how to test two libraries. I only starting to create tests

  • @SuriyaJ-u9h
    @SuriyaJ-u9h 5 місяців тому

    after long time live web tab redux store are getting empty why?

  • @codehunter1366
    @codehunter1366 5 місяців тому

    Aw, why you read article as always hehe

  • @seanjonas5024
    @seanjonas5024 5 місяців тому +1

    Hi

  • @shubhamgupta-bl1tr
    @shubhamgupta-bl1tr 5 місяців тому

    Render prop pattern

  • @PalladinGOLD
    @PalladinGOLD 5 місяців тому +1

    Good chanell, but BAD video. You’re just reading. I think it would be better if you wrote the code with TS in IDE

  • @danielniels22
    @danielniels22 5 місяців тому

    is this another word of Currying?