redux-observable Questions

4

Solved

I've been using object-oriented programming practices for 25 years and trying to move toward functional programming for the last 5 years, but my mind always goes towards OOP when I'm trying to do s...
Transpose asked 30/4, 2017 at 10:51

3

Solved

Let's say, I have a stream of actions. Each action is assigned some id. Like this: const actions$ = of({ id: 1 }, { id: 2 }, { id: 1 }); Now, for each action, I want to perform some logic in swi...
Halvah asked 6/7, 2019 at 20:5

4

I'm working on a React application that uses the following architecture: redux typesafe-actions redux-observable My question is: How can I execute an UI action on specific redux action? For ex...
Treadmill asked 27/3, 2019 at 18:55

4

Solved

I want to conditionally dispatch some actions using iif utility from RxJS. The problem is that second argument to iif is called even if test function returns false. This throws an error and app cra...
Addia asked 8/1, 2019 at 18:54

2

I am able to setup redux-observable with normal Firestore queries export const getStatementsEpic = (action$, store) => { return action$.ofType(GET_STATEMENTS) .filter(() => { const state ...

2

Solved

I am using redux, redux-observable. I have the following import { EMPTY, Observable } from "rxjs"; const setCurrentDatastoreIdEpic = (action$, state$): Observable<any> => action$.pipe(...
Peugia asked 4/12, 2019 at 7:40

3

Solved

I'm not sure how to write a React observable epic with Redux Toolkit and Typescript. Suppose I have this authSlice: import { CaseReducer, createSlice, PayloadAction } from "@reduxjs/toolkit&qu...
Precincts asked 12/10, 2020 at 15:1

7

Solved

I want to debounce a stream - but only if the source value is the same as before. How would I do this with RxJS 5? I do not want to emit a value if the value is the same and I emitted it previousl...
Swum asked 14/6, 2017 at 22:36

2

Solved

I work on a React Native app using redux-observable. I have 10+ epics, all ending with .catch(err => console.error(err)) in order to display the React Native "Red box" (see https://facebook.gith...
Gelinas asked 14/9, 2016 at 20:59

2

Solved

In redux-observable is it possible to use isomporphic-fetch instead of Rx.DOM.ajax?
Timeconsuming asked 26/7, 2016 at 12:3

5

I want to dispatch multiple actions from a redux-observable epic. How can I do it? I originally started with const addCategoryEpic = action$ => { return action$.ofType(ADD_CATEGORY_REQUEST) ...
Openmouthed asked 25/12, 2017 at 2:2

2

Solved

I have a Stencil component library using @Stencil/redux, redux, redux-observable and redux-actions. Everything worked fine before but I'm trying to upgrade to Stencil@One (1.0.0-beta.5). I have no...
Ethicize asked 28/5, 2019 at 21:59

6

Solved

I have used Redux-Saga. Code written with it is easy to reason so far, except JS generator function is messing up my head from time to time. From my understanding, Redux-Observable can achieve the ...

3

Solved

I am creating an app using React and Redux-Observable. I am new to this and I am trying to create an epic to execute the user login. My epic is below: export const loginUserEpic = (action$: Actio...
Demilune asked 21/11, 2018 at 15:28

1

Solved

I am trying to wrap my head around the difference between concat and concatMap when using redux-observable. In my intuition, I'm thinking that concatMap would work: - From a FAKE_LOGIN action, it ...
Ruthven asked 16/1, 2019 at 11:31

1

Solved

I am creating a web app using React and Redux Observables and I would like to create a unit test for the timeout scenario of one of my epics. Here is the Epic: export const loginUserEpic = (actio...
Canica asked 22/11, 2018 at 9:43

2

Solved

I am trying to create a simple redux-observable epic which debounces and is cancelable. My code: export const apiValidate = action$ => { return action$.ofType(validateRequestAction) .debounce...
Graycegrayheaded asked 4/8, 2017 at 18:45

2

Solved

I've installed latest "rxjs": "6.2.2", and "redux-observable": "1.0.0",. I have precommit hook that does eslint checks. After installation is started to throw this error: C:\XXX\node_modules\an...
Brad asked 20/8, 2018 at 9:17

2

Solved

I'm looking for way of dispatching multiple redux actions in a single Epic of redux-observable middleware. Let's assume I have following Epic. Everytime when SEARCH event happens, Epic loads data...
Adagietto asked 30/11, 2016 at 11:2

4

Solved

I'm using the fbsdk to get user details in an ajax request. So it makes sense to do this in a redux-observable epic. The way the fbsdk request goes, it doesn't have a .map() and .catch() it takes t...

2

Solved

I am new to reactjs and trying to integrate redux with my existing project. This is my index.js file in store import 'rxjs' import { createStore, combineReducers, applyMiddleware } from 'redux' i...
Wheelbarrow asked 1/10, 2018 at 8:1

2

Solved

I have an action that will then trigger an ajax request. If the action fails for some reason, I want to do nothing. Instead of creating a blank action that just returns the previous state, is there...
Simulation asked 18/4, 2017 at 14:21

2

Solved

Typescript supports discriminated unions. How to extend the same concept with Rxjs to the filter operator in below example? interface Square { kind: 'square'; width: number; } interface Circle ...
Pillowcase asked 25/5, 2018 at 8:44

1

Solved

I am trying to test this epic https://github.com/zarcode/unsplashapp/blob/master/src/epics/photos.js . Problem is that map never happens when I run test (which I assume means that Promise never res...
Lambert asked 21/5, 2018 at 17:46

2

Solved

So I have use case where I update the api request when the map is moved - but it could generate several rapid fire requests with small map movements - and I want to cancel all the inflight requests...
Kosey asked 3/5, 2018 at 17:4

© 2022 - 2025 — McMap. All rights reserved.