Context vs Redux: What to Choose? - Experts Zone #6 | frontendhouse.com

preview_player
Показать описание

0:00 - Intro
0:34 - Agenda
0:50 - What is the application state?
1:05 - Passing props through components
1:50 Tools to manage application state: Context API and Redux
5:18 - Advantages of Context
5:47 - Advantages of Redux
6:13 - Which one should you choose?

Have a nice watch! Don’t forget to like the video and leave comments to share your impressions! ⚡

Рекомендации по теме
Комментарии
Автор

To summarize: Whenever a Context provider's state changes, Context will cause a re-render to all the components (parent or child) consuming that context (which CANNOT be controlled). This is exactly the behaviour expected when prop-drilling is done. On the other hand, Redux will cause (dispatch) re-render to only those components which are ingesting a certain value (selector) from the store.
[ A caveat to this is that the same behaviour of Redux can be induced into Context as well, by having different contexts (ProContext and ConContext). You would have to manually write different contexts, so that one context's state change would not cause re-render to a component consuming a different context. Redux does the same out-of-the-box]

souravraychaudhuri
Автор

TLDR: Is the project big and state is ever changing ? Use Redux : Use Context

nanonkay
Автор

after 2 months using usecontext i just realized the everything re-render stuff, well you cannot notice any performance change if your app is simple and rarely use states, but for a big app this is a serious matter

flowerofash
Автор

Amazing tutorial, short and sweet. What I wanted. Thanks my friend :)

akhilchandra
Автор

incredibly easy explanation, probably the best one I've seen

andreo
Автор

Can't we just use useMemo with Context API and prevent unnecessary renders as well?

febobebo
Автор

It would be nice to have the screen just bigger - hard to see

xabb
Автор

Solid video, needed the comparison. You should increase the videos size and reduce the size of your face cause thhe code font was small.

danielzambrano
Автор

Nice bit of knowledge for newcomers, great delivery

lukor-tech
Автор

Thank you very much, please increase your font size on the tutorials.

clebhosh
Автор

sorry, 4k and you can't see the text. terrible

fghbsrtywrtwre
Автор

Don't add background music when speaking bro

akshaysanthosh
Автор

Should definitely work on talking to the camera just not reading off a script. It was really jarring. Otherwise good video.

ChillAutos
Автор

Your intro is half the size of your video ... thumbs down ...

htmlfivedev