Загрузка видео...

Не удалось загрузить видео

На главную

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

120,830 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 10

Фото профиля George Moller
George Moller2 лет назад

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 ↓

Фото профиля Stephen Burke
Stephen Burke2 лет назад

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?

Фото профиля Sarju
Sarju2 лет назад

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.

Фото профиля Farley
Farley2 лет назад

What are you closing exactly?

Фото профиля Paulo Barros
Paulo Barros2 лет назад

@fernandozabin @feokuma @AmorimRob

Фото профиля Chung Wei
Chung Wei2 лет назад

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.

Фото профиля احمد الشبيب
احمد الشبيب2 лет назад

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 👇

Фото профиля Anthony Laflamme
Anthony Laflamme2 лет назад

Clever

Фото профиля allen.xyz
allen.xyz2 лет назад

Does this require order to be maintained in the array?

Фото профиля MMILife
MMILife2 лет назад

What's the pros and cons aside from readability?

Похожие видео