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

Update Home.py #73

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Update Home.py #73

merged 1 commit into from
Jun 6, 2024

Conversation

SurajSanap
Copy link
Owner

@SurajSanap SurajSanap commented Jun 6, 2024

To avoid a full page reload when switching themes in Streamlit, you'll need to use a more dynamic approach to update the theme settings. Streamlit currently does not have built-in support for single-page application (SPA) behavior out-of-the-box, but we can minimize the impact of rerunning the script by leveraging Streamlit's session state and component updates.

Here’s how you can modify your code to minimize page reloads:

Separate Theme State Management: Use session state to manage the theme without triggering a full rerun.
Use Components Judiciously: Ensure that only the necessary components are updated when the theme changes.

@SurajSanap SurajSanap self-assigned this Jun 6, 2024
@SurajSanap SurajSanap added bug Something isn't working level2 girlScript Summer of Code 2024 labels Jun 6, 2024
@SurajSanap SurajSanap merged commit e4c34af into main Jun 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working level2 girlScript Summer of Code 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant