You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I am trying to render live components dynamically by passing a component module name through the assigns. I found the dynamic component, but that doesn't work for my use case with live components obviously as I need to store state and handle events. Is there a way around this currently or is this something you are looking to add? Would be happy to help out in any way.
Also, was thinking the components (and live components) could be dynamically rendered using by passing their module name as such below instead of having to use the Dynamic component and then pass the module name. Not sure what exactly is done under the hood to convert the components to html, so maybe this isn't possible.
Current setup <Dynamic.Component module={@component} id={@some_id} prop1={@prop1} />
I opened a PR for dynamic live component ( check this PR #518 )
Dynamic.Component is only for stateless components so it cannot render stateful components ( live components ) that is why I suggested Dynamic.LiveComponent for stateful components , you can check it and see if it is working for you
Hello! I am trying to render live components dynamically by passing a component module name through the assigns. I found the dynamic component, but that doesn't work for my use case with live components obviously as I need to store state and handle events. Is there a way around this currently or is this something you are looking to add? Would be happy to help out in any way.
Also, was thinking the components (and live components) could be dynamically rendered using by passing their module name as such below instead of having to use the Dynamic component and then pass the module name. Not sure what exactly is done under the hood to convert the components to html, so maybe this isn't possible.
Current setup
<Dynamic.Component module={@component} id={@some_id} prop1={@prop1} />
Proposed dynamic components
<{@component} id={@id} prop1={@prop1} />
The text was updated successfully, but these errors were encountered: