re-rxjs / react-rxjs

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

Component receiving and empty object when remounting #157

Closed voliva closed 3 years ago

voliva commented 3 years ago

Steps to reproduce:

  1. Call bind with an observable that emits asynchronously (e.g. 1000ms)
  2. Create a component that uses the hook from (1)
  3. Use this component in two different routes, each with its own <Subscribe> boundary
  4. Switch from one route to the other

Expected behaviour:

Current behaviour (0.6.1):

Sandbox: https://codesandbox.io/s/react-rxjs-empty-value-0n7zj?file=/src/App.tsx