How can i load the tabs lazily?

hi~ i got some confusions about st.tabs.

i created four tabs on my streamlit app.

if i change certain data or configs, the four tabs will reload, how can i make the selected tab reload exclusively and other tabs reload only when i switch to them, that mean lazy load.

Hi @buyixiao,

Every time a user interacts with a widget, Streamlit reruns your script from top to bottom – that’s why all the tabs reload. If you don’t want your entire app to rerun, I’d recommend looking into using an st.form or caching.

1 Like