Comments (3)
Use a set overload of feedback loop or create your own feedback loop.
from rxfeedback.swift.
@kzaher i updated the question, and the demo address was set.
i hope you can run the demo to make sure you know my question correctly
actually, i didn't understand your reply above
does 'a set overload of feedback loop' mean the 'Set<Query>',
and what do you mean 'create my own feedback loop',
does it means that i can redefine the ' react<State, Query, Event>' function in 'Feedbacks' file?
Thx
from rxfeedback.swift.
The problem is a misusage of the library. You are using Requests which is a reference type as a storage of the requests but IN the query this line state.requestsToSend.all()
is mutating the shared storage.
So the next time the query is computed, the previous requests that already fired an effect are not there anymore and their corresponding effects are canceled.
If the above doesn't make sense to you, then think of how you would it if you have only one request.
You would have to encode an optional variable of RequestType in the state and when the optional request becomes != nil then you fire the effect. You return the value back to nil is when you get the response. If you return it back to nil before you receive the response, then no event will be emitted.
Instead of the Requests class just use the Set in the State and keep the RequestType in the Set until you get a response. In case you are not interested in the result of some RequestType remove it from the Set and the flatMapLatest
will make sure you don't get any event.
from rxfeedback.swift.
Related Issues (20)
- Please update the examples in the README HOT 2
- Problem building dependencies of the example app. HOT 6
- RxFeedback example PlayCatch not working HOT 1
- Add more example about the new react function
- GithubPaginatedSearch example bug
- RxFeedback functions autocomplete problem HOT 2
- Ambiguous reference to member 'system(initialState:reduce:scheduler:feedback:)'
- The printing is printed only after network request is done.
- How can I fix this warning HOT 1
- RequestLifetimeTracking forwardRequests: Duplicate keys were found in Dictionary HOT 6
- Non-equatable requests in 2.0 HOT 6
- [Proposal] Introduce ObservableSystem make system chainable. HOT 3
- How to test the Event creation?
- [Proposal] React for Void?
- bind(self) { ... } leaks HOT 4
- [Request] Could you port RxFeedback to Combine HOT 2
- Carthage for macOS HOT 1
- New Release Tag HOT 11
- [Xcode 15 RC1 Bag] Names conflict HOT 5
- Cannot call value of non-function type '[Observable<Event>.Type]' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxfeedback.swift.