-
i want to use adaptive theming for resuing components on diffrent sites with changing styles, i wanna avoid propdrilling because i have a 3-5 layers of nested components
|
Beta Was this translation helpful? Give feedback.
Answered by
a-h
Apr 7, 2024
Replies: 1 comment 1 reply
-
Yes, there's an explanation of how to use context to avoid prop drilling in the docs at https://templ.guide/syntax-and-usage/context/ And how to create middleware to pass the context down at https://templ.guide/syntax-and-usage/context/#using-context-with-http-middleware |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
JuLi0n21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, there's an explanation of how to use context to avoid prop drilling in the docs at https://templ.guide/syntax-and-usage/context/
And how to create middleware to pass the context down at https://templ.guide/syntax-and-usage/context/#using-context-with-http-middleware