is there a way to pass certain properties down the...
# general
g
is there a way to pass certain properties down the component hierarchy (from parent -> child) without passing the property explicitly to the childs constructor? I.e. think of something like Reacts Context API.
i
There is not, unfortunately. You’d have to pass the data to each child’s constructor.
w
Note that we do inherit some - like
provider
and
protect
down the hierarchy already today. It's reasonable that we could add something like
.context
on components that gets inherited in a similar way, reaching up to the root of the hierarchy to find a value. That would though make the interface for a component much less explicit - they would presumably then depend on some ambient
context
being provided. @glamorous-printer-66548 Curious if you have a design for this in mind that you think would work well? If so, would be great to open a GH issue with the suggestion to track this (and disucss).