Replies: 2 comments 1 reply
-
@coorasse thank you for sharing your question! Generally, I'd recommend using a separate component for your "layout" in this case. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for your answer @joelhawksley but I still don't understand how I can re-use it, without duplicating code...maybe inheriting from the same component? |
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
-
I tried to look for documentation regarding this, but unfortunately I could not find anything.
I'd like to share the same "layout" among multiple components, so that they have all a common structure, but I am not sure how to do that.
Imagine that I have multiple Card components, and they should all be rendered within a
<div class="card">
, I am not sure how to achieve that. My two components are simple:I'd like both of them to render:
how can I re-use a common layout?
Beta Was this translation helpful? Give feedback.
All reactions