Closed ItsNiceCraft closed 9 months ago
Hey @ItsNiceCraft, sorry for not responding earlier. Did you end up with a solution here?
I'm curious about your use-case. The way we typically solve the "pass data across pages" problem is through usage of st.session_state. Is this not working for you for some reason?
I am using query parameters because they are easy to link to from places outside of the app, like the bookmark bar. I could look into switching to the session state method however.
Arnaud @.***> schrieb am Mittwoch, 3. Januar 2024 um 14:21:
Hey @.***(https://github.com/ItsNiceCraft), sorry for not responding earlier. Did you end up with a solution here?
I'm curious about your use-case. The way we typically solve the "pass data across pages" problem is through usage of st.session_state. Is this not working for you for some reason?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Sounds good. To be clear, I think the two work well together! You may read query params to initialize the state of your app from the URL (which, I agree, is very convenient). But then you may store those in st.session_state so they're shared throughout pages! Closing this
Description
It would be perfect if it was possible to pass query parameters either by including them in the page title or adding them as a new argument in the switch_page function. A great use case of this would be switching to a sub page after clicking a button on a main page that passes on data to the sub page.
Minimal code for the extra
No response
Screenshots
No response