component argument #1577
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Like we have module arguments, we can also create component argument, so one can pass a component constructor to another component:
Say we have a component:
And we are creating a component that uses a button:
Now
header
needs anbutton
argument, so I can do this:I am passing
my-button
toheader
asbutton
, so it must have the same signature asbutton
defined earlier (compiler will verify that).Beta Was this translation helpful? Give feedback.
All reactions