re-rxjs / react-rxjs

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

feat(utils): partitionByKey && mergeActiveKeys #174

Closed josepot closed 3 years ago

josepot commented 3 years ago

Hopefully this will allow us to deprecate the following utils:

While also providing a simpler way to create subscriptions for parametric bind Observables.

@voliva could you please finish this?

codecov[bot] commented 3 years ago

Codecov Report

Merging #174 (b6abc5f) into main (506d5b1) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #174   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        28    +2     
  Lines          389       430   +41     
  Branches        48        53    +5     
=========================================
+ Hits           389       430   +41     
Impacted Files Coverage Δ
packages/utils/src/collect.ts 100.00% <ø> (ø)
packages/utils/src/collectValues.ts 100.00% <ø> (ø)
packages/utils/src/split.ts 100.00% <ø> (ø)
packages/utils/src/combineKeys.ts 100.00% <100.00%> (ø)
packages/utils/src/getGroupedObservable.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 506d5b1...b6abc5f. Read the comment docs.

josepot commented 3 years ago

Code coverage went down to 99.53%... alt text

josepot commented 3 years ago

I know that we've had this conversation "offline" before, but I really think that the order of the return value of partitionByKey should be reversed: first the inner-observable-getter and then the observable of keys... :thinking: image

josepot commented 3 years ago

Combinekeys test has a typo: emmit vs emit

Fixed! Thanks!