For my multi-tab application, I am working on a snapshot / PDF print feature of a App view.
In the file that generates the PDF, I’d like to access components store in dcc.Store
from other tab.py
files.
index.py
app.layout = html.Div([
# header
html.Div([
# Store component for tab1.py
dcc.Store(id="store1", storage_type="local"),
# Store component for tab2.py
dcc.Store(id="store2", storage_type="local"),
],
)
])
The pdf generate file returns pdf layout/design, I’d like to access components from dcc.Store
, something like below.
def report(store1, store2):
return html.Div(
html.H2("Effective Lease Calculations"),
# Access dcc.Store component
print_value = store1['val']
html.Div(
print_value,
style={
'marginTop': '2in',
'fontSize': '28px'
}
),
)
My question is, can you access dcc.Store
components store locally without using State("store1", "data")
in callback?