taniarascia / comments

Comments
7 stars 0 forks source link

react-context-api-hooks/ #100

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

How and When to Use Context in React with Hooks | Tania Rascia

A while ago, I wrote an article about Using Context API in React. However, most of my examples on that page used Class components, , and…

https://www.taniarascia.com/react-context-api-hooks/

good3n commented 3 years ago

Thanks for going through and updating the syntax for the modern approach!

nezlobnaya commented 3 years ago

Thanks Tania!Great article!Just a small typo in the Example section: it's Context Provider not Context Proider

lucasfrutig0 commented 3 years ago

nice article! Context APIi is shine

zacwang89 commented 3 years ago

Thanks Tania, a great article as always.

I assume the second-to-last code sippet should be: WidgetProvider -> DashboardWidgetProvider WidgetControls -> DashboardWidgetControls

And the last code sippet: DashboardWidgetProvider -> DashboardWidget

sharathbangera6 commented 2 years ago

Thanks Tania.

Quick question : Is it fine to do a GET call inside a context and store the result so that application can use it ? or should it be done inside children component and then set the state of context from children ?

Gt-Am commented 2 years ago

牛哇牛哇

jackchoumine commented 1 year ago

nice article.