# Custom widget to connect many applications in Streamlit

**URL:** <https://discuss.streamlit.io/t/custom-widget-to-connect-many-applications-in-streamlit/7047>\
**Category:** Custom Components\
**Created:** [November 11, 2020, 8:00am UTC](https://discuss.streamlit.io/t/custom-widget-to-connect-many-applications-in-streamlit/7047 "2020-11-11T08:00:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![andfanilo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/andfanilo/32/1040_2.png) [@andfanilo](https://discuss.streamlit.io/u/andfanilo)\
**Post date:** [November 17, 2020, 7:46am UTC](https://discuss.streamlit.io/t/custom-widget-to-connect-many-applications-in-streamlit/7047/4 "2020-11-17T07:46:27Z")

</div>

Hey @Chakra, welcome to the community 🙂

I wrote a bit about buttons and state here, it should apply to your need if you translate to your problem by a SessionState check to `if ner_button_clicked`.  
The thing to understand is when you interact with the FileUploader, the script reruns with the `ner_button_clicked` button state set to `None` since you didn’t click on it at the last interaction, so we must somehow preserve this info. For now `SessionState` is the way to go to preserve info between two runs. You can store which button was last pressed in the SessionState and display the corresponding app.

> [@Is there any working example for Session State for streamlit version \>= 0.63.1](https://discuss.streamlit.io/t/is-there-any-working-example-for-session-state-for-streamlit-version-0-63-1/4551/2):
>
> Hey @Codeguyross, I’m assuming you meant button instead of checkbox, since you don’t need SessionState for checkboxes because they preserve their return values on script rerun : import streamlit as st if st.checkbox('Click me'): if st.checkbox("Click me too !"): st.write("Hello world") Whereas buttons don’t, so when you click the first one it gets to True but when you click the second one, the first one goes back to None and doesn’t pass the first check. So for this case : Firs…

BTW I like this proposal 🙂 those buttons are appealing.

Fanilo

---

_[View the full topic](https://discuss.streamlit.io/t/custom-widget-to-connect-many-applications-in-streamlit/7047)._
