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
So it can happen that the state which defines editable has expired, been recreated blank, and the frontend has re-rendered that rx.var but now it is showing blank data (in this case the "edit" panel disappears).
Various frontend events like clicking a tab can force the rx.var re-render (that is the case for our app).
To Reproduce
Render an rx.var inside a tabbed component. Now expire the Redis state backing the Var and then change the tab view so that Var value is re-rendered. Now it will show the initial state.
Expected behavior
It seems like forcing the page reload is the only "fix" for the expired state. Ultimately it seems like the framework should force reload pages before their states expire if the tab is still open. Or that could be an electable behavior.
The text was updated successfully, but these errors were encountered:
Describe the bug
There is logic to detect if a state has expired from Redis when handling an event, and to force a page reload in that case:
reflex/reflex/app.py
Line 1403 in c3ac051
However this logic is not triggered simply from rendering an @rx.var like this:
So it can happen that the state which defines
editable
has expired, been recreated blank, and the frontend has re-rendered that rx.var but now it is showing blank data (in this case the "edit" panel disappears).Various frontend events like clicking a tab can force the rx.var re-render (that is the case for our app).
To Reproduce
Render an rx.var inside a tabbed component. Now expire the Redis state backing the Var and then change the tab view so that Var value is re-rendered. Now it will show the initial state.
Expected behavior
It seems like forcing the page reload is the only "fix" for the expired state. Ultimately it seems like the framework should force reload pages before their states expire if the tab is still open. Or that could be an electable behavior.
The text was updated successfully, but these errors were encountered: