Closed
Description
Hello,
I tried to use live component javascript hooks from custom stimulus controller without any success. It seems that the hook is not fired from stimulus controller.
On my twig component I added my custom controller
<div class="flex-1 overflow-auto" {{ attributes.defaults(stimulus_controller('medisupport-sync')) }}>
...
</div>
And here my medisupport-sync_controller.ts
import {Controller} from '@hotwired/stimulus';
import {Component, getComponent} from '@symfony/ux-live-component';
export default class extends Controller<HTMLDivElement> {
private component: Component;
async initialize() {
// Get Symfony live component
this.component = await getComponent(this.element);
this.component.on('connect', (component) => {
console.log('connect', component);
});
this.component.on('render:finished', (component) => {
console.log('render:finished', component);
});
}
}
I should get a console.log on connect and on render finished, but I do not have any thing.
Any ideas ?

EDIT : I used live-component 2.10 (current last version)
Metadata
Metadata
Assignees
Labels
No labels