re-rxjs / react-rxjs

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

takeUntil operator cannot complete a StateObservable #291

Closed Jesus-Gonzalez closed 1 year ago

Jesus-Gonzalez commented 1 year ago

Description

The takeUntil operator doesn't work when applied on a StateObservable.

Playground

To demo the bug, I have created the following playground: https://codesandbox.io/s/react-rxjs-bug-takeuntil-1-d69w72 You should expect the counter to stop incrementing when pressing the STOP button.

Environment

rxjs 7.6.0 @react-rxjs/core 0.10.3 @react-rxjs/utils 0.9.5 react 18.2.0

voliva commented 1 year ago

Thank you @Jesus-Gonzalez!

This was on the rx-state/core library. I fixed it there, and I released a patch version @react-rxjs/core@0.10.4 that has this fixed.