[LiveComponent] The `data-poll` with no internet connection lead to broken component state
I've a dashboard-like application, running on a tablet. Some of the live components use the data-poll to update the display data:
If connection isn't available for some reason the request is sent and will fail. This is obvious.
But... the live component seems to remain in a "broken" state and will never recover, that is the component will not re-render when the next data-poll occurs. In my specific case, data-poll is set to 60 seconds. Only a full page refresh will solve the issue.
Is there any way to "recover" the live component?
Two ideas with 0% certitude there :
Did you try to manually handle errors or so with JS hooks ? https://symfony.com/bundles/ux-live-component/current/index.html#javascript-component-hooks
You could maybe even try to plug yourself into the Stimulus application (example in the stimulus handbook i think)
@smnandre thanks for the idea. Was Just curious about why components do not "recover" from this kind of errors. It's the expected behaviour? WDYT?
By the way I think that "response:errore" hook will not be called in this situation since response will never be received... but not 100% sure.
No, I think we need to consider this further. I'm just not ready to make any time-related promises. :)