In the ground since Fri Oct 01 2021
Last watered inFri Oct 01 2021
When you have nested contexts, the innermost context takes precedence over the outer context. This means that the innermost context will be used when a component consumes multiple contexts.
On the example below the ChildComponent doesn't have its own context, so it uses the context provided by the ParentComponent. So the value is light. If, we didn't have ParentComponent with a Context, only then, the Context's default value would be used: light.