Skip navigation
❌ Avoid Provider wrapping hell in React.
0:00 / 0:23

❌ Avoid Provider wrapping hell in React.

George Moller

@_georgemoller117K followers

Visit on X
2,441 likesDownloadOriginal post

256,778 views

❌ Avoid Provider wrapping hell in React. ✅ Instead combine all your Providers using composition.

10 Comments

Comments from the original post on X (Twitter)

  • George Moller's profile picture

    @_georgemoller

    Gain a competitive edge by writing code that's not just functional, but also clean and performant ↓

    9 likes

  • George Moller's profile picture

    @_georgemoller

    I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics and 50+ video animations just like this one. Check them out ↓

    6 likes

  • GiFTED!'s profile picture

    @_0xGiFTED

    You’re basically doing the same thing, only cleaner 🙂

    3 likes

  • Pavel Romanov's profile picture

    @pavl_ro

    What about typescript support for those props?

    4 likes

  • Matt's profile picture

    @burn2delete

    If someone presented this during an interview. I would hire them.

    3 likes

  • George Moller's profile picture

    @_georgemoller

    🤣

  • Brandon Austin's profile picture

    @bran_aust

    Looks pretty. In instances where I’m in provider wrapping hell, which is often, I find that the order of Providers is incredibly important. Not sure I’d be able to adopt

    2 likes

  • Alex Sherman's profile picture

    @alxshrmn

    this is fkn wild 👏

    2 likes

  • Roiko's profile picture

    @roikohn

    Why is "provider hell" bad though? Pretty easy to follow the hierarchy, no?

    9 likes

  • George Moller's profile picture

    @_georgemoller

    I agree with you, the “avoid” part is an exaggeration 🤣. There is nothing wrong with having multiple providers at the root. You hardly ever revisit the root so it should be fine!

    1 like