All Questions
Tagged with rxjs redux-observable
438 questions
1
vote
1
answer
89
views
Handle refresh token with Redux-observable
I am working on a client app with React, Redux, and Redux-Observable, and I want to make a refresh request every time I receive an AccessDenied exception after the initial request.
The problem is that ...
1
vote
1
answer
354
views
Dispatching multiple actions in an async/await mergeMap
I'm still new with redux-observable so please excuse me if this is a stupid question.
Basically I need to await some Promises then dispatch multiple actions in an epic. But returning an array of ...
0
votes
1
answer
91
views
How is this redux observable Epic works?
Now I'm working on website authentication, and I have added access and refresh tokens. I want to create an auto-refresh action to obtain a new access token. So, if my server returns an "access ...
0
votes
1
answer
116
views
Dispatched action in redux is canceled when an action is dispatched twice
I am facing an issue where I'm dispatching an action twice in my useEffect with different payloads. Both actions are correctly dispatched but only the second one executes my epic function.
Here is my ...
1
vote
2
answers
475
views
Delay time between Observable values - RxJS
I am using redux-oservable and am having an issue with timing on my observables. I want to introduce a delay between the emission of values within an array.
The epic that I'm working with looks like ...
1
vote
0
answers
39
views
Rxjs: How to map to multiple actions so they are not processed in parallel
I'm trying to implement card game with redux-observables. And what I'm trying to achieve to draw cards for each player but this needs to be done sequentialy. But they probably run concurently because ...
0
votes
3
answers
1k
views
Get the result value from an observable stream
I am using an angular 12 project.
I have an observable:
export class RegisterUserShellComponent implements OnInit {
constructor(private store: Store<State>) { }
user$: ...
1
vote
0
answers
308
views
how to dispatch action and wait for its completion inside epic of redux-observable
So I am new to "rxjs" and redux-observables (worked with redux-saga before and familiar with the concept of reactive programming).
What I want to know is how can I dispatch an action from an ...
0
votes
1
answer
482
views
Redux-observable dispatching multiple actions
I'm learning to use redux-observable and RxJS in react-native then I face a problem with dispatching multiple actions after performing a Firestore get document request.
This is my epic:
const ...
0
votes
0
answers
137
views
How can I put a delay on the same subsequent action?
Using redux-toolkit, rxjs, redux-observable
I want to add a 1-second delay between the same action if they are within a short period of time.
A naive example:
if you click a button that displays a pop-...
0
votes
1
answer
483
views
How to emit actions before and after a promise observable -- Redux Observable (rxjs6)
I want to dispatch an action, fetchData, to get data from my API and store it in my redux store by dispatching the action setData. I was able to do this with the following epic:
export const ...
3
votes
0
answers
143
views
Err Call Api on redux observable using Axios
I'm trying to learn redux-observables but I seem to be having an issue getting my app to return data. I keep getting the error below and I'm not sure where I'm going wrong or what the error actually ...
0
votes
2
answers
2k
views
Wait for all observables from a mergeMap to complete before performing a side effect
I'm still new to rxjs, so I'm having trouble on how to do this. I want to perform a side effect when all the observables from my mergeMap completes, but I don't know how to "split" the ...
0
votes
1
answer
53
views
How to share a variable between epics that are in different files?
I'm using redux-observable in my nextjs web application. There is a variable which has to be set in epic1 and accessed later in epic2:
let sharedVariable;
const epic1 = (action$, state$) => {
...
2
votes
1
answer
95
views
Why we need to return a stream instead of direct dispatch a value?
On workspace, my colleagues told me that i must instead of writing this
import store from './store.ts'
// Epic code
...
mergeMap(data => {
store.dispatch(someActionCreator(data))
return ...