We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, as discussed on gitter here is the code that causes the issue :
import xs from 'xstream' import {makeRemoteDataDriver} from 'cycle-remote-data' const cachedDriver = () => { const {request} = makeRemoteDataDriver() const makeRequest = (path) => request({method: 'GET', url: `${HTTP_ENDPOINT}/data/${path}`}) let cache = {} return { query(query) { if (cache[query]) { return cache[query] } return cache[query] = makeRequest(query).remember() } } } const repository = cachedDriver() xs.periodic(1000).map(() => repository.query('heey') .map(res => res.when({ Loading: () => 'l', Ok: () => 'o', Error: () => 'e', })) ) .flatten() .debug() .addListener({})
expected: ----l-o--o----o----o---->
----l-o--o----o----o---->
got: ----l-o--l-o--l-o--l-o-->
----l-o--l-o--l-o--l-o-->
As you said, this is a hot vs cold thing
And thanks again for the cool library btw
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, as discussed on gitter here is the code that causes the issue :
expected:
----l-o--o----o----o---->
got:
----l-o--l-o--l-o--l-o-->
As you said, this is a hot vs cold thing
And thanks again for the cool library btw
The text was updated successfully, but these errors were encountered: