Replies: 1 comment 5 replies
-
Can you show some more code? I always use the "magewire:available" event to be sure Magewire is loaded. But I'm not sure this applies to your question. |
Beta Was this translation helpful? Give feedback.
5 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
I'd like to know what the best practise / recommended way is for registering a component that isn't available on initial page load.
(apologies in advance if any of my terms are wrong)
For example:
I am currently adding my MW component to the cart-drawer, this means that html output by my template is within the Apline component.
When
Magewire.start()
is ran, my MW component is not part of the DOMTo get around this at the moment I have added
To the end of my template file.
This appears to work, and I can interact with my MW component normally.
Questions
window.magewire.addComponent(el)
?Beta Was this translation helpful? Give feedback.
All reactions