Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't bail on new context Provider if a legacy provider rendered above #12586
Arguably we don't have to fix it but it's pretty confusing to debug and I expect this to be a hurdle to libraries adopting new context while the ecosystem hasn't fully migrated yet (for example React Router already has a bug about this: ReactTraining/react-router#6072).
This only affects the
A downside of doing this is that if you have both providers, with this change, when you remove a legacy provider from the tree, a modern provider becomes more “aggressive”.
So there’s probably going to be confusion either way: the question is whether we’d rather make adding modern context or removing legacy context harder.