solara icon indicating copy to clipboard operation
solara copied to clipboard

[question] live updates/websocket

Open swelborn opened this issue 1 year ago • 1 comments

Hello. I would like to know if it is possible to trigger updates to the frontend through websockets with solara.

Something like this, for example: https://github.com/OpenChemistry/distiller/blob/main/frontend/distiller/src/features/notifications/index.ts#L76

swelborn avatar Feb 23 '24 18:02 swelborn

Hi,

does https://solara.dev/examples/general/live_update help you? Solara already has a websocket connection, so no need to create another one. Note that instead of use_thread you can also now use https://solara.dev/api/use_task or https://solara.dev/api/task

Regards,

Maarten

maartenbreddels avatar Feb 23 '24 21:02 maartenbreddels