symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
818 stars 298 forks source link

[LiveComponent] Stimulus controller inside a Live Component does not rerender #2126

Open Nek- opened 2 weeks ago

Nek- commented 2 weeks ago

Re-opening #2048 in a new issue.

TL;DR: If you have a stimulus controller inside a live component, after the live component reloads, you will experience weird issues (dom in an unexpected state) because of dom morphing feature of turbo/live components.

Examples I have:

For those interested, I summarized #2048 solutions in this article: https://wiki.swag.industries/en/symfony/ux/controller-state-after-live-update

smnandre commented 2 weeks ago

Can you create a small reproducer so we can look at a concrete case of this problem and see what can be done ? :)