I would like to bump up the topic of callbacks without outputs again because I discovered this to be a common use-case if you use Dash to communicate with other processes.
One example that comes directly into my mind is if you communicate with a Redis server and want to write some values depending on the user input in the Dash app. In a current case I need to control a process that captures the data. The parameters for the capturing like sample time, buffer size and measurement can be controlled by the user via Dash client. So I find myself creating dummy divs for each parameter for being able to transfer them to the Redis server. I know this is the recommended workaround however I think it is not a nice solution and creates unnecessary complexity in the frontend.
I would very much prefer a solution like this:
@app.callback(Output(None), [Input("samplerate_slider", "value"])
def update_samplerate(value: int) -> None:
redis_client.set("samplerate", value)
Another use-cases I can think of that currently needs dummy divs and could be simplified by this approach:
- setting session-specific parameters in the backend like addressed in https://dash.plotly.com/sharing-data-between-callbacks
So maybe we can revive the discussion about callbacks without outputs again
I’m also very willing to offer my help when it comes to implementation.
