ngxs / store

🚀 NGXS - State Management for Angular
http://ngxs.io
MIT License
3.54k stars 405 forks source link

🐞[BUG]: store.select finalize on catchError #2251

Closed vaskus closed 2 weeks ago

vaskus commented 2 weeks ago

Description

When subscribe into store select item and map into http call which fail, subscription finalize and there is no chance to call same subscription again. Working example with problem You could found on stackbliz: https://stackblitz.com/edit/stackblitz-starters-mrty2d

🔬 Minimal Reproduction

You can find problem on stackbliz https://stackblitz.com/edit/stackblitz-starters-mrty2d

Libs:

Browser:

For Tooling issues:

markwhitfeld commented 2 weeks ago

This is not an issue with NGXS, but is working exactly as rxjs operates for the pipeline you have created. I forked your repro and replaced the store.select with an rxjs interval call, and it exhibits the exact same behavior. image https://stackblitz.com/edit/stackblitz-starters-cb7p4h?file=src%2Fmain.ts%3AL45