Releases: re-rxjs/react-rxjs
@react-rxjs/[email protected]
- Fix
bind
not supporting streams that emit functions #152
@react-rxjs/[email protected]
@react-rxjs/[email protected]
-
Breaking change:
Subscribe
is now a super-set ofReact.Suspense
. The default fallback is stillnull
, though. -
Breaking change: We are no longer making the initial subscription on render. It's now the responsibility of the user to make sure that the initial subscription is there before the hook consumes the observable. That can be accomplished in many different ways, but the most common ones should be using Subscribe or with top-level subscriptions. In a nutshell what's going to happen is that if during render, if we have to throw a Promise to trigger suspense we won't create that promise unless the subscription of the Subject that's used for multicasting is already there. This guarantees that render is always free from side-effects.
-
Fix: If a "suspended" observable completes without emitting any values, we will throw an error that can be captured from an error-boundary.
-
Fix: If a Subscribe component gets unmounted while one of its children is on Suspense, the underlying observable will be disposed.
@react-rxjs/[email protected]
Minor update: bind
now accepts an optional argument defaultValue
. Passing this argument prevents the hook from entering on Suspense. Therefore, you may not need to have a top-level subscription for its stream, because the first subscription will happen once the component is mounted. Also, if the stream at any point emits SUSPENSE
, then the hook will return the defaultValue
, rather than entering on Suspense.
@react-rxjs/[email protected]
- bug-fix: Suspense was being triggered on StrictMode for hooks that didn't have a top-level subscription but that were synchronously emitting values.
- Small changes to decrease the bundle-size.
@react-rxjs/[email protected]
Many performance optimizations due to changes on the internals:
- Avoid using rxjs operators internally (now we only use Observable and Subject).
- Prevent unnecessary calls to react's setState.
- Remove some unnecessary observable enhancers that were used internally.
- Get rid of the "unsubscription grace time": this was a very dangerous performance optimization, that didn't actually optimize that much. It was not documented and it was not part of the API, so (at least in theory) no one should have been relying on it. Also, it was a time-bomb for those that were unknowingly relying on it, so we've decided to remove it. If your App starts misbehaving after upgrading to 0.4.4, it's very possible that's your case. So, please be sure that you have the necessary top-level subscriptions so that you don't rely on render to start the subscriptions.
v3.0.0-alpha.5
- Critical bug fix #56
- Apply patches to dev-dependencies
v3.0.0-alpha.4
- Apply patches on dev-dependencies
- Improve build by avoiding warnings and avoiding publishing unnecessary TS definitions
v3.0.0-alpha.3
v3.0.0-alpha.2
- Observables returned from
connectObservable
andconnectFactoryObservable
now complete if the source completes. createInput
has been deprecated in favor ofsubjectFactory
.- Added
useSubscribe
andSubscribe
utils. - Improved README and tests.