Event to know a `turbo-stream` has been rendered

There’s no built-in event for notification after a Turbo Streams render.

Instead, add a Stimulus data-controller attribute to the element you render inside the <turbo-stream> element. Then implement the connect() method on that controller to know when the element has been loaded into the document.

6 Likes