I asked this question on stackoverflow and a user pointed me to this forum.
I have a clientside_callback to get the width of the window whenever a dropdown value is changed:
app.clientside_callback(
"""
function(a,b,c) {
var w = window.innerWidth;
return w;
}
""",
Output('x_pixels', 'children'),
Input('x', 'value'),
Input('y', 'value'),
Input('z', 'value'),
)
Which updates a html.Div:
html.Div([
html.Div(id='x_pixels')
], style={'display': 'none'})
Which is throwing an error dc[namespace][function_name] is undefined
. However, the strange thing is this doesnât always happen, it happens only around 90% of the time, and once the browser window and dash app is refreshed, the error doesnât appear when it has reloaded.
Any help greatly appreciated!