You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the RxFeedback on my project. And one of the business is to send out multiple requests when entering a specific page. So I change the State and in the side-effects callback I merge those Observables for each request into one and map the merged Observable into signal. however, only one request data is refreshed by the Driver though all the requests came back. What am I doing incorrectly?
here is my code FYI:
internalstaticfunc sideEffect(query:Query,
with dependancy:Dependancy)->Signal<Command>{
if query.urls.count >0{return dependancy.api
.makeRequests(apis: query.urls,
constrained: dependancy.constrained).asSignal(onErrorJustReturn:.failure(.unknown)).map(Command.reponseReceived)}returnSignal.empty()}func request(apis:[URLType])->Observable<Response>{letobservables:[Observable<Response>]=
apis.flatMap{ api inreturnCornerstone.NetworkProxy
.implementor
.response(api: api, url: api.URL, get: api.query).map{
if let data =...as?[String:Any]{return.success((data: data, type: api))}return.failure(.unknown)}.catchErrorJustReturn(.failure(.unknown))}returnObservable.merge(observables)}
The text was updated successfully, but these errors were encountered:
@kzaher What if some service produces two responses: (1) cached data, (2) freshly fetched data? From what I see RxFeedback allows only one emission from an effect, or I missed something?
I'm using the RxFeedback on my project. And one of the business is to send out multiple requests when entering a specific page. So I change the
State
and in the side-effects callback I merge thoseObservable
s for each request into one and map the mergedObservable
into signal. however, only one request data is refreshed by theDriver
though all the requests came back. What am I doing incorrectly?here is my code FYI:
The text was updated successfully, but these errors were encountered: