platform icon indicating copy to clipboard operation
platform copied to clipboard

Docs: Add section to Effects with guidance on which operator to use

Open brandonroberts opened this issue 4 years ago • 8 comments

Other information:

Provide some clear documentation on which flattening operator to use for common tasks with Effects. There's 4 to choose from currently.

  • concatMap
  • exhaustMap
  • mergeMap
  • switchMap

May could include an example of how each operator behaves differently.

brandonroberts avatar Jul 10 '20 02:07 brandonroberts

This article from @cartant can be also linked there: https://ncjamieson.com/avoiding-switchmap-related-bugs/

alex-okrushko avatar Aug 24 '20 16:08 alex-okrushko

I'll work on this

jordanpowell88 avatar Aug 24 '20 16:08 jordanpowell88

@jordanpowell88 before you do, please check with @brandonroberts . He might be working on this 😅

timdeschryver avatar Aug 24 '20 17:08 timdeschryver

Ok, certainly @brandonroberts will do an excellent job writing this up

jordanpowell88 avatar Aug 24 '20 17:08 jordanpowell88

I'm up for working on this if it's not active

david-shortman avatar Feb 20 '21 05:02 david-shortman

If this is still relevant, I can write a section on this

Armenvardanyan95 avatar Nov 02 '21 07:11 Armenvardanyan95

Thanks @Armenvardanyan95, I'm still planning to take this one

brandonroberts avatar Nov 02 '21 11:11 brandonroberts

This is one of the most common issues I see with the implementation of NgRx. People tend to use switchMap even for database writes and, under the right circumstances, it causes subtle issues. @brandonroberts are you still planning to work on this? I'd be happy to take a crack at it.

KylerJohnsonDev avatar Aug 16 '22 13:08 KylerJohnsonDev