You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A friend of mine and I tried the liveview axum example today, and we were wondering about how to share the counter between all the instantiations of the app() function. Is this somehow possible in a way so that the counter changes in all clients at the same time?
I can imagine that sharing a channel and then yielding the counter with the help use_coroutine() into the App's render function might work. Is this the recommended way, or do I miss something?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A friend of mine and I tried the liveview axum example today, and we were wondering about how to share the counter between all the instantiations of the
app()
function. Is this somehow possible in a way so that the counter changes in all clients at the same time?I can imagine that sharing a channel and then yielding the counter with the help
use_coroutine()
into the App's render function might work. Is this the recommended way, or do I miss something?Beta Was this translation helpful? Give feedback.
All reactions