Feature request - asynchronous notifications

I think that there are a couple of issues at play here.
1 - Customizable error handling UI. Right now, it isn’t possible to display backend error messages to the front-end (but it should be)
2 - Asynchronous messages - communicating messages (to multiple outputs) to the web app while a callback is being executed. For example, something like:

@app.callback(
    [Output('component-1', 'children'), Output('component-2', 'children')],
    [Input('input-1', 'value'), Input('input-2', 'value')])
def update_outputs(output1, output2, input1, input2):
    output1.set_value('Loading...')
    result = perform_expensive_computation(input1, input2)
    output2.set_value(result)
    output1.set_value('Done')

This would be primarily useful for loading messages.
3 - Customizable UI on a per-component basis while callbacks are being executed (“loading state”). (see 📣 Dash Loading States for an interim solution).
4 - UI components for displaying “messages” like the react-notification-system.

4 will be most useful once 1 and 3 are done. I’m considering proposals like 2 for the next version of Dash but I’m not yet sure how useful it will be outside of the loading state and error state use cases.

1 Like