Partial provide/inject #8387
Unanswered
arrudaje
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a component that is composed by many children components, all of which use one particular injection key, provided by this parent component. It just so happens that I don't want all children to read from the same provided value, but instead be able to provide a value to be injected in only one child component, for example. I tried to implement a simple
Provider
component that outputs the default slot and provides whatever is in the prop, but this doesn't work.Also, I can't use props for the same reason why provide/inject exists: to avoid prop drilling, as those child components have a long chain of children components themselves.
Beta Was this translation helpful? Give feedback.
All reactions