Preserving state across sidebar pages

Edit: hmm… I’m experiencing a small bug in the script above, where the first time you edit one of those text boxes the UI resets to 0 but the session state is set correctly. I’ll look into this later today.

I really like @thiago’s gist for session state, but I’m experiencing this same bug and I see it as a blocker to using state.

It sounds like the bug is well understood by the Streamlit team already so I’m not bothering to turn my code into a minimal example, but I could if that would be helpful.

1 Like