re-rxjs / react-rxjs

React bindings for RxJS
https://react-rxjs.org
MIT License
546 stars 18 forks source link

fix(partitionByKey): unsubscribe from all streams when refcount reaches 0 #202

Closed voliva closed 3 years ago

voliva commented 3 years ago

I've found a couple of issues with partitionByKey:

I couldn't manage to change split/collect to solve these issues without breaking other split/collect tests, so I've reimplemented it as a standalone operator. I added a bunch of tests for added coverage, but the relevant ones are in these commit: https://github.com/re-rxjs/react-rxjs/commit/717b5dc4df853808e696147fa6cbfb7632971c20

Edit: with this change we've decided to remove the old split/collect/collectValue methods

codecov[bot] commented 3 years ago

Codecov Report

Merging #202 (6e20cb2) into main (903c929) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #202   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        23    -4     
  Lines          448       422   -26     
  Branches        60        61    +1     
=========================================
- Hits           448       422   -26     
Impacted Files Coverage Δ
packages/utils/src/internal-utils.ts 100.00% <100.00%> (ø)
packages/utils/src/partitionByKey.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 903c929...6e20cb2. Read the comment docs.