How does react context help improve your code?

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

My VSCode Extensions:
- theme: material community high contrast
- fonts: Menlo, Monaco, 'Courier New', monospace
- errors: Error Lens
- extra git help: Git Lens
- tailwind css intellisense
- indent rainbow
- material icon theme
- prettier & eslint
- ES7+ React Snippets
Рекомендации по теме
Комментарии
Автор

As a total noob to react, I really appreciate you taking the time to show all of the details! This stuff is so helpful 🙌

movntn
Автор

A use case i find it very useful in, is for the creating and displaying of toaster / alert popups. You can create a top level container for your toasters / alerts and dispatch an action to display from anywhere. Can easily be done for Modals via hooks too.

unalinanli
Автор

Very well explained, the theory laid out first, then full code and console examples....perfect.

ToddDunning
Автор

Holy. I've been trying to learn this hook and you explained it in such a simple way. Thank you for sharing knowledge!

WhyAreThereHandlesNow
Автор

Could you make a video sometime going over setup and simple crud with the t3 stack again sometime? There seems to have been some structural changes that changed a few things that a beginner like me has trouble navigating through

jhoco
Автор

I believe it is suggested that provider is applied for individual usages as much as possible because of that reason.

tounsoo
Автор

I found myself massively overusing useContext in like every possible moment.
I don't think that's good, but I like it.

But as you said, it's usually not good to store large or fast changing states there.
So, since I am at this issue, overusing big contexts for data storage,
What would be a good alternative ?

Ebiko
Автор

great vid, near the end of the video you said it can rerender the app down, how would you avoid all renders of child components when using Context

SahraClayton
Автор

how does react useReducer help improve your code?

dualwan
Автор

Dude, was it so hard to make new file for context, and don't mess with the main file and make it so confusing? 🤷

rytispleckauskas
join shbcf.ru