Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing action to the component #37

Open
kota7 opened this issue Nov 15, 2022 · 0 comments
Open

Passing action to the component #37

kota7 opened this issue Nov 15, 2022 · 0 comments

Comments

@kota7
Copy link
Owner

kota7 commented Nov 15, 2022

I find it tough to pass an action to the exiting component due to the design of streamlit.
The main difficulty comes from that fact that st.experimental_rerun invokes the constructor, and thus the current game state is discarded. Technically we can keep all relevant state as the component value and reconstruct the app after the rerun, but that would make the value set large, because it would include the history information as well.
I need to think of better approaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant