Skip to content

use directive on custom component #722

Answered by ryansolid
ptrckhjnl asked this question in Q&A
Discussion options

You must be logged in to vote

No it is not currently possible. Components have no instance to attach to, and use uses an in scope compiler trick to get the directive which isn't possible for out of scope things like other files or even spread handling. This comes with the territory on this approach and why Svelte also doesn't support use directives on their Components.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@ptrckhjnl
Comment options

@ryansolid
Comment options

@SmartNetAR
Comment options

Answer selected by ptrckhjnl
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants