Is @react-rxjs/core@0.6.0-1 a significant breaking change from 0.5.0?
See original GitHub issueUpgrading to @react-rxjs/core@0.6.0-1
I can’t get the most basic PoC to work.
import React from "react";
import { bind, shareLatest } from "@react-rxjs/core";
import { timer } from "rxjs";
import { startWith } from 'rxjs/operators';
const [useTimer] = bind(() => timer(0, 1000).pipe(startWith(0), shareLatest()));
export default function App() {
const timer = useTimer();
return <div className="App">{timer}</div>;
}
Error
Missing subscription
If this is due to breaking changes, a suggestion would be to expand this exception message to give more detail. Plus, to add a demo package with a few working examples to provide end users with a sanity check.
If it is a regression, perhaps there can be some integration tests added.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Breaking changes in .NET 7 - Microsoft Learn
NET 7, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or Windows Forms....
Read more >GitLab.com is moving to 15.0 with a few breaking changes
Some of these removals are breaking changes, because this release is a major version release. We try to minimize such breaking changes but ......
Read more >bookshelf/CHANGELOG.md at master - GitHub
Major Breaking Changes · Global state is no longer stored in the library, an instance is returned from Bookshelf. · Lowercasing of bookshelf....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @ilikejames - glad that you’re finding a solution.
A quick note however, just to clarify:
In this example,
useTimer
can be used without needing a<Subscribe />
boundary, butuseTimerSum
does, even if theoretically it wouldn’t dispatch suspense, so it will throw “Missing subscription” if used straight away.This is because
bind
can’t really know if a stream is doing something that would become asynchronous. To avoid this (without using<Subscribe />
), useTimerSum also would need a defaultValue.Edit: Also, the
shareLatest()
in this example is redundant, you shouldn’t need it.No need to apologise, though perhaps in future
0.6.0
could have been released as a prerelease version before the docs were updated 😉I follow your last part and see that…
…works.
And after discussion with @voliva, using a default value in this way bypasses
Suspense
completely. So this is an option for the majority of our streams, and then we only need to use<Subscribe/>
on the few stream that should trigger suspenseful behaviour in the ui.Ok. Thanks!