Description
I have a simple app with a few buttons. When the user clicks on a button, the text next to the button toggles between "asserted=False" and "asserted=True".
The first time a user brings up the app everything works as expected. The network tab looks like this.
After a refresh the app keeps sending events but stops receiving them.
This behavior is consistent across any components that depend on state. Notably, the user is unable to change the value of inputs.
Server code:
def start_app(dispatch):
from idom.server.sanic import SharedClientStateServer
# we use a redux-like dispatch structure to send events to outside the idom event, then update state
# with a callback stored outside the app.
# I've tried removing this particular piece of functionality and the problem persists.
root = lambda: Panel(dispatch)
app = SharedClientStateServer(root)
return app.daemon("0.0.0.0", 3040)
Any ideas on the root cause or a way to mitigate? The PerClientStateServer throws a CannotAccessError due to our rapid state updates, logging (f"Did not update {component} - resources of {self} are closed")
so it's a no-go (sorry, I've been waiting to file an issue on that one!)
Thanks!