Skip to content

is it possible to pass ctx to a templ.handler(component)? #674

Closed Answered by a-h
JuLi0n21 asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JuLi0n21
Comment options

Answer selected by JuLi0n21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants