Updating multiple views with 1 button update

I am facing a challenge with the view update mechanism. My application has two views that need to be updated based on user input: a WebView and a GeometryView. Currently, each view is updated independently, leading to redundant computations. I want to streamline this process so that a single action (ideally, a single button press) can update both views simultaneously, using the results from a single computation.

Is it possible to configure the system in such a way that one button can trigger the update for both the WebView and GeometryView, ensuring that the computation is executed only once and both views are updated together? This would greatly enhance efficiency and clarity in the application’s operation.

Resources consulted:

Current workaround considered (combination of all points):

  • Using Storage to ‘communicate’ between views
  • Have one view with a long duration and the other with a short duration
  • Make it raise an error in the short duration if not up-to-date

Hi @kassi

Thanks for raising the interesting use-case. Just quickly first-off, did you consider using the Memoize functionality named in the docs? This does rely on inputs and outputs of the calculation being serializable.

1 Like