Open
Description
Description
When there are multiple subscriptions with the same ID, Elmish subscription logic will start the first one and emit an error on the subsequent duplicates. I propose that it would be better if none of the duplicates were started.
With "first one wins", the runtime behavior can be very confusing. Especially because subs may be turned on or off from model changes. For example:
sub1 and sub2 have the same sub ID
event | sub1 | sub2 | result |
---|---|---|---|
startup | - | on | sub2 started |
sub1 on | on | on | sub2 stays running, error emitted |
sub2 off | on | - | sub2 stays running |
-vs-
Nobody wins
event | sub1 | sub2 | result |
---|---|---|---|
startup | - | on | sub2 started |
sub1 on | on | on | sub2 stopped, error emitted |
sub2 off | on | - | sub1 started |
I believe the latter scenario will bring the the issue to the dev's attention more quickly. In fact, I fear the current behavior could cause novel UI behaviors that distract the dev from finding the issue.
Metadata
Metadata
Assignees
Labels
No labels