Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Avoiding using Global Variables

I wish to use a variable within the sheet to run a call back i.e.:

@app.callback(
    Output('Holder', 'children'),
    [Input(Generate_ID([UPDATED_VALUE]), 'value')])

however I am trying to avoid doing this with a global variable for reason as explained in https://dash.plot.ly/sharing-data-between-callbacks.

However since the value is already within a callback trying to run a callback on a callback using a hidden variable results in dependency errors (and using app.layout[’…’].value has an issue as described in Values in input not updating).

Would “User-Based Session Data on the Server” be a recommend way of doing this (as described in https://dash.plot.ly/sharing-data-between-callbacks)

Many Thanks

1 Like