Export a component as an alias #1795
xypnox
started this conversation in
Ideas & RFCs
Replies: 1 comment
-
If we are exporting symbol defined in another module and want alias feature, we should do this this: Because doing so without alias is currently is done like this: So this is logical change. For symbols defined in current file, we can use an alias type: This can be generic alias for anything, records, variables, components. Or we do: This allows more than one aliases to be defined in one line (not sure I am fond of that, as that does not scale to many aliases, unless we allow: Not sure I like it either. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Export a component declared inside a file or imported from some other dependency with a different alias.
Usecases
Re-expose larger components as defaults or rename a component to a smaller version when used externally.
Ex: There could be several hero components in a library, and
hero-image-right-ctamight be exported asherofor ease of use as it would be the most used variant.Similarly,
secondary-buttoncould be exported asbutton.Beta Was this translation helpful? Give feedback.
All reactions