Rendering a component twice #1452
Unanswered
franzliedke
asked this question in
Q&A
Replies: 1 comment 10 replies
-
I don't think you should have any problem instancing a component multiple times, that's what it is made for! |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some use cases where I could imagine rendering a component instance twice. For example, we render our navigation menu markup twice, once for wider screens and once for the small-screen dropdown menu variant.
For this, I could imagine re-using the components for the individual menu elements that appear in both menus and call
#render_in
twice.Are there any known downsides to / dangers in doing that, i.e. due to internal state of components during rendering? What do I have to be careful about?
Beta Was this translation helpful? Give feedback.
All reactions