Open utterances-bot opened 3 years ago
Thanks for going through and updating the syntax for the modern approach!
Thanks Tania!Great article!Just a small typo in the Example section: it's Context Provider not Context Proider
nice article! Context APIi is shine
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
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 ?
牛哇牛哇
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/