|
|
|
|
|
by lewisl9029
2616 days ago
|
|
I wouldn't go as far as to say Context is the most important concept in React, but it's also not nearly as bad as CSS cascading. Context is fully opt in. A Context provider upstream will have no observable effect on your downstream components unless you have a component that explicitly chooses to consume _that particular context_. I think you're thinking of the old Context API where everything merged onto the same shared context object and read from it implicitly. _That_ was a nightmare, hence why it was never recommended for general use, but the new API doesn't suffer from the same issues. |
|