Extending Components with Existing Props #1546
Unanswered
McleanWorkshield
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Forgetting, for a second, the JavaScript parallel: How would you think about the types for this, in Rust? It's genuinely difficult, and a place where JS/TS inheritance (vs. Rust's composition of traits) combined with the fact that the DOM is designed for/in JavaScript makes it much easier to do this in JS/TS frameworks. (The short answer is that there is not a way, at present, to do what you're asking.) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! I'd love to make a component that is able to extend from an existing component or serve as a base component.
For example, I'd love to allow all props that might pass into a to be available for a button.
That way I can pass all the available attributes as needed with custom reusable styling.
Maybe there is a better way to do this in Leptos?
Beta Was this translation helpful? Give feedback.
All reactions