title: Is there a better way to perform multiple output with Dash by Plotly?
body: <p>As we can see in <a href="https://plot.ly/dash/getting-started-part-2#interactivity" rel="noreferrer">Interactivity part of Getting started</a>, one callback function can accept multiple inputs but always has single output. </p>
  
  <p>Assume that we have two blocks separately that must be updated after input change. Of course, the simplest way is to make two callbacks with same input for each of the blocks. The problem is that request performs twice while one is enough to get all data.</p>
  
  <pre><code>@app.callback(
      dash.dependencies.Output('element_1', 'children'),
      [dash.dependencies.Input('filter', 'value')])
  def callback_element_1(filter):
      return get_data(filter).el1
  
  @app.callback(
      dash.dependencies.Output('element_2', 'children'),
      [dash.dependencies.Input('filter', 'value')])
  def callback_element_2(filter):
      return get_data(filter).el2
  </code></pre>
  
  <p>Solution I find is to wrap these elements in single block and re-render it completely with a single request. But in this case all static content in the wrapper will be refreshed too, especially if initial elements are far from each other in DOM.</p>
  
  <pre><code>@app.callback(
      dash.dependencies.Output('wrapper', 'children'),
      [dash.dependencies.Input('filter', 'value')])
  def callback_element_wrapper(filter):
      data = get_data(filter)
      return html.Div(
          children=[
              data.el1,
              # more static content
              data.el2,
          ]
      )
  </code></pre>
  
  <p>So maybe there are more elegant way to output in two or more elements with a single request?</p>