I'm creating a Dash app and in some parts of it, I have a button and a loader. Once the user clicks the button, I want the loader to appear while the calculations are performed (might take 1-2 minutes) and when it's done to remove the loader. In order to do so, I created a callback that has as an input the button click and the output is the style of the slider. However, In this single callback, I want to change the view of the slider twice (to show it once that calculation started and second, to hide it once the calculations are done) The problems are (from my understanding): The callback only knows to return a result once it is ended. I can't create another callback for the output of the slider because Dash says I can't have multiple outputs: The code I used is something like this: @app.callback( Output("container", "children"), Output("lottie-loader", "style"), ---> initial state is that the loader is hidden Input("scan-button", "n_clicks"), State("container", "children") ) def show_on_map(n_clicks, children): if (n_clicks > 0): style = {'display': 'none'} ---> it is here because if i play it in the return it will be executed right on startup LONG CALCULATIONS return children, style ---> should return to be hidden @app.callback( Output("lottie-loader", "style"), Input("scan-button", "n_clicks"), ) def update_style(n_clicks): if (n_clicks > 0): style = {'display': 'block'} ---> tried to make the style visible return style due to those limitations, is there any way that I can for example click the button, already update the loader while the calculations are still performed in the callback, and not wait for the return? Continue reading...