Not able to add state to my app

I have my app ready with 2 pages in streamlit. Both the pages grow vertically downward with expanders. These epanders have text areas, text inputs sliders, selectboxes, multiselects, etc. I am trying to add state each of these widgets in the expanders, but I am not able to make my app state-full. Could someone kindly help?