Replies: 5 comments
-
|
[DEFAULT]
Final connection count = 1 PS. Equivalent to rxjs |
Beta Was this translation helpful? Give feedback.
-
|
Example sequence of actions and behavior:
Final connection count = 1 PS. Equivalent to rxjs |
Beta Was this translation helpful? Give feedback.
-
|
Example sequence of actions and behavior:
Final connection count = 3 PS. Equivalent to rxjs |
Beta Was this translation helpful? Give feedback.
-
|
Example sequence of actions and behavior:
Final connection count = 3 PS. Equivalent to rxjs |
Beta Was this translation helpful? Give feedback.
-
|
Notes from discussion with @joaqcid around how to control concurrency....
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@markwhitfeld comments:
Ok, so I'll summarise my discussions with @joaqcid in separate comments below.
Firstly, let's establish a baseline for what the connect options mean:
trackBy: used to determine how many connections are triggered by the same actiontrackBywill allow for multiple connections, each of which is identified by the data returned by thetrackBythat you providetrackBy(the default) then there will only ever be one active connection for this actiontrackBythen there will only ever be one connection for this actioncancelPrevious: used to determine how a new action will be handledcancelPreviousis false (the default) then new actions are ignored if there is an existing connection with the sametrackBycancelPreviousis true, then the new action will be used to create a connection that will replace an existing connection with the sametrackByThe combination of these two properties fully determines how the
NgxsFireStoreConnecthandles its "connections" to streams. Obviously the source stream created by the action call can also have its own logic about when it completes.Each combination of options is listed below:
{ trackBy: undefined, cancelPrevious: false, ... }connect options config and scenarios #53 (comment){ trackBy: undefined, cancelPrevious: true, ... }connect options config and scenarios #53 (comment){ trackBy: (a) => a.id, cancelPrevious: false, ... }connect options config and scenarios #53 (comment){ trackBy: (a) => a.id, cancelPrevious: true, ... }connect options config and scenarios #53 (comment)Beta Was this translation helpful? Give feedback.
All reactions