I have an user interface and provide a button to the user, which executes the function longComputation(x: A): A
and updates then the user interface (particularly the model) with the new result. This function may take longer to compute the result and should therefore compute in parallel.
Diode provides me with Effect
, PotAction
, and AsyncAction
. I read the documentation about Effects and PotActions/AsyncActions, but I cannot even get a simple example to work.
Can someone point me to or provide an simple working example?
I created a ScalaFiddle based on the SimpleCounter
example. There is a LongComputation
button, which should run in parallel; but is not.