Make a property available to all descendants? #3268
Answered
by
bennypowers
joeattardi
asked this question in
Q&A
-
I am writing a library using Lit. There are some properties that need to be accessed by all elements (an i18n provider, config options, etc). I want to avoid if I can passing these all down as properties to each level of the hierarchy (what the React world calls prop drilling). Is there any lightweight way I can do this? Something similar to React's context API I guess? |
Beta Was this translation helpful? Give feedback.
Answered by
bennypowers
Sep 3, 2022
Replies: 1 comment 1 reply
-
You might like to try the context lab. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
joeattardi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might like to try the context lab.