Dbc.tabs refresh everytime I switch tabs

I have 5 app.py files. I have created a multipage app using these files and I have basically 5 tabs at the top the page each tab containing the layout of each app.py file.

When I switch to any tab, it refreshes the tab and Start fresh. I want when I switch between tabs the last state is shown. Let’s say I have selected some filter in one tab, when I switch back to that tab I want those filteres to be selected and so on. How can I achieve that?

You can use the persistence property of the component for which you’d like to retain the state on page refresh. For example, if you’ve created a dropdown menu, you can do the following:

dcc.Dropdown(['NYC', 'MTL', 'SF'], 'NYC', id='demo-dropdown', persistence=True, persistence_type='session'),