Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

120,830 Aufrufe • vor 2 Jahren •via X (Twitter)

10 Kommentare

Profilbild von George Moller
George Mollervor 2 Jahren

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

Profilbild von Stephen Burke
Stephen Burkevor 2 Jahren

This seems like a useless abstraction. You typically never need to touch that nest so adding all of that extra code to achieve the same result seems pointless. What am I missing?

Profilbild von Sarju
Sarjuvor 2 Jahren

By doing this you are increasing lines of code, complexity and bug surface area and reducing readability and plus if you are using typescript, there will be lots of extra things to handle compare to original one.

Profilbild von Farley
Farleyvor 2 Jahren

What are you closing exactly?

Profilbild von Paulo Barros
Paulo Barrosvor 2 Jahren

@fernandozabin @feokuma @AmorimRob

Profilbild von Chung Wei
Chung Weivor 2 Jahren

This makes your code even harder to read and maintain, not to mention an unnecessary loop. Just move all providers into a separate component and call it a day.

Profilbild von احمد الشبيب
احمد الشبيبvor 2 Jahren

Love your tips George, but this one is not for me. Regardless of the unreadable code I had to create for our lord Typescript, but the App initial start seems to have an odd behavior now? It looks like its re-loading multiple times before it actually settles. Before and After 👇

Profilbild von Anthony Laflamme
Anthony Laflammevor 2 Jahren

Clever

Profilbild von allen.xyz
allen.xyzvor 2 Jahren

Does this require order to be maintained in the array?

Profilbild von MMILife
MMILifevor 2 Jahren

What's the pros and cons aside from readability?

Ähnliche Videos