Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 08 04:54
    dependabot[bot] labeled #775
  • Dec 08 04:54

    dependabot[bot] on npm_and_yarn

    chore(deps): bump decode-uri-co… (compare)

  • Dec 08 04:54
    dependabot[bot] opened #775
  • Dec 06 23:28
    dependabot[bot] labeled #774
  • Dec 06 23:28

    dependabot[bot] on npm_and_yarn

    chore(deps): bump qs from 6.2.1… (compare)

  • Dec 06 23:28
    dependabot[bot] opened #774
  • Nov 13 09:06
    dependabot[bot] labeled #773
  • Nov 13 09:06

    dependabot[bot] on npm_and_yarn

    chore(deps): bump loader-utils … (compare)

  • Nov 13 09:06
    dependabot[bot] opened #773
  • Nov 08 11:40
    D34THWINGS commented #752
  • Nov 07 23:00
    peter-coastpay-com commented #752
  • Nov 01 16:28
    danmcdaid commented #681
  • Sep 06 14:05
    robations commented #752
  • Aug 29 10:17
    vforvaios closed #772
  • Aug 24 13:13
    vforvaios commented #772
  • Aug 24 07:48
    vforvaios commented #772
  • Aug 23 21:03
    jayphelps commented #772
  • Aug 23 09:41
    vforvaios edited #772
  • Aug 23 09:40
    vforvaios opened #772
  • Aug 08 22:25
    halfmatthalfcat commented #546
ChristherNand
@ChristherNand

Hi everybody, does anyone know why the console.log() is not being printed on the console?
I am new to redux-observable and I am trying to understand how it does work.

Does it have to be with an action that is not being called, If so, how could I call that action in order to execute this console.log()?

Thanks for your help!!

const getEpic$: Epic<SetOptions, SetOptions, RootState> = (action$, state$) => action$.pipe( ofType(setOption.type), withLatestFrom(state$), switchMap(([action, state]) => { console.log('why is not getting into here?', { action, state }); }) );

Kevin Ghadyani
@Sawtaytoes

@ChristherNand
Epics are functions that return observables, not observables themselves. Put a tap(console.log) before ofType(setOption.type). That will help debug if you're seeing any actions. If you are, then move it down a step until it stops firing.

That should help you debug.

ChristherNand
@ChristherNand
@Sawtaytoes Hi, log worked before ofType(), but it did not after
why is not the action being dispatched? that´s what I believe its happening
Nisim Joseph
@nisimjoseph

hi, question about the Epic signature, for TS code.
the signature is:

export declare interface Epic<
  Input extends Action = any,
  Output extends Input = Input,
  State = any,
  Dependencies = any
> {

and I am force to have the Output action to derived from Input action.
why is that?
why do I limited to it?

Kevin Ghadyani
@Sawtaytoes

@Sawtaytoes Hi, log worked before ofType(), but it did not after

@ChristherNand I'd check 2 things. In Redux Devtools, make sure the action is getting dispatched. If not, then that's step 1. If it is getting dispatched, make sure the value passed to ofType is correct.

Most-likely, your value isn't getting dispatched because you've got something preventing it from being dispatched. Can you share the code where you're dispatching it?

JAW
@Jawkx

Hi, this might be a stupid question, but having trouble implementing a debounce search function using redux-observable.
My current setup is something like this every time the query changed it will dispatch an action, the action will be piped down an epic like follow. Note that the search(action.payload.query) is an action creator

export const onSearchChangedEpic: Epic<AllActions> = (action$) =>
  action$.pipe(
    filter(isOfType("QUERYCHANGED")),
    debounce((action) => {
      // Dispatch an action immediately if the query is empty.
      if (action.payload.query.length === 0) {
        return EMPTY;
      }
      return timer(500);
    }),
    map((action) => {
      if (action.payload.query.length === 0) {
        // Clear search results.
        return resetResults();
      }
      return search(action.payload.query);
    })
  );

The expected result is when I stop typing for a period (500 ms) a search() action will be piped, but what happen is the debounce timer will always reset when i type. So if I type 5 character, it will debounce for 5 time (2500 ms) before piping out a search result

Is there anything i can do to get the expected behaviour? ( when I stop typing for a period (500 ms) a search() action will be piped)

1 reply
innovationstack
@innovationstack:matrix.org
[m]
SURAJ KAWALE
@suraj-kawale-au2
Hello guys , I am trying to implement rxjs websocket , using redux observable .I came across this article which helped me implement same. But the issue here is in my companies codebase the epic are written differently than this article . https://techinscribed.com/websocket-connection-reconnection-rxjs-redux-observable/ . Is this two epic equal ?
image.png
image.png
André Vitor de Lima Matos
@andrevmatos
Hello. I'm having some serious memory leak issues with the QueueScheduler usage in redux-observable@2 with rxjsw@7. We do some heavy subject usage in our codebase (some ReplaySubject(1) in deps, among others), although we avoid at maximum explicit subscribes and try to leave everything for the global subscription. Nonetheless, it seems QueueActions are pilling up and clogging memory heavily. We checked and it seems subscriptions are not leaking (all subjects's observers, including internal redux-observables subjects, are constant in number), but QueueAction, and observeOn's OperatorSubscribers instances makes our memory usage skyrocket, and these actions are not freed. Most of it seems to be references in _teardowns. Removing queueScheduler usage on redux-observable makes the problem disappear, but it may be triggered by something we do. Does anyone have experience with this kind of issue? If not, I may try to prepare a self-contained repro to open an issue
André Vitor de Lima Matos
@andrevmatos
André Vitor de Lima Matos
@andrevmatos
memory leak fixed by rxjs@7.3.1
Abhishek Kumar
@ceroy-ak
For testing inside run, both hot and cold are passing the test. So which is the correct one to use for testing of Epics and what do Hot and Cold means in context of "redux-observables" as a middleware for redux
1 reply
morsmodr
@morsmodr
Has anyone implemented SSR with NextJS on an app that uses React, Redux and Redux Observable?
My application uses RO as an infinite side-effect manager, and currently the only SSR example is using a Subject and shutting it down after all epics are done
This makes sense if the epics were implemented to be solely for async tasks and ended after the async task was done
If I use the example implementation, my SSR solution times out as the epics never end :)
Valerii Petryniak
@valerii15298
Hello, guys:) I am starting using redux-observable. After some time choosing I decided redux-observable over redux-sagas
hazemmadkour
@hazemmadkour

I have inside my app many small apps (app1,app2,app3,....). i want to add app1 middleware and epics if he has license to app1. also the same with app2, app3 ....etc.

is there a way to do this?

1 reply
Full Stack Developer
@LuckyGuy1024
Hello Everybody. Nice to meet you.
I'm a web developer from Hong Kong with 6 years experience in React, Redux.
Suhail Ibn Nisar
@suhailibnnisar
I'm working on an old project and it's using redux-observables and I'm very new to redux-observables. Just wondering if I should migrate from redux-observables or it stills worth using?
2 replies
Convert Vy
@vyconvert_twitter
Hello, I have my new site which called https://vyconvert.com/. VyConvert is the place where you can find everything about converting: celcius to farenheit convert, convert cm to inches, convert pdf to word, etc. The main purpose of vyconvert.com is to provide a comprehensive collection of convert-type results matching your search! Hope you like it and take a look at it
Liu Can
@liucan233

`import type { Epic } from 'redux-observable';

import { filter, mapTo,map } from 'rxjs/Operators';

export const demoEpic: Epic<any,any,any,any>= (action$,state )=>{
console.log(action$)
return action$.pipe<any,any>(
filter<any,any>((v:any)=>{
return false
}),
mapTo({type: '1231'})
)
}`

there are ts error, Can you help me?
Junior
@Muhammad-Waleed-Hafeez
image.png
image.png
hi there i'm new to reactjs and don't know how to read this console returning resylt data
is there anyone who can help me or guide me on this. doesn't matter if you have any reference link please let me know.
Dmitriy Sushko
@suhoij
Hello, I’m fairly new to redux-observables. A few questions I have:
  1. We’re using old version of the library in our project. How can I find old docs?
  2. I’m wondering if there any guidelines or best-practices (like for example having one api call per one epic)? I’m trying to understand
    what is the best way to declutter my Epic. Do we usually mix up business logic in epic with api requests?
    Thanks!
Junior
@Muhammad-Waleed-Hafeez
image.png
Can anyone help me on this?
i have onClick event on my a-tag and yesterday that onclick event worked at first time but after that till now for some reason my onclick event isn't working. why?
Junior
@Muhammad-Waleed-Hafeez
has anyone used NextJs with asp.net core for web development?
MasterLuV
@nighttiger1990
I'm integrate redux-observable with react-native (react-navigation). How can I navigate to other screen in Epics?
Gary Tokman
@gtokman
is it possible to have two maps returning an action in the same epic?
Songzi Zhang
@nnzsz_twitter
Can someone help me out that I keep getting actions must be plain objects. use custom middleware for async actions
Manuel Sanchez
@JoMaDotio
Hi everyone, some noticed before that the test they provide on the web page for the dependency injection doesn't work. or am I just doing it wrong?
Dan McDaid
@danmcdaid
@nnzsz_twitter Check the actions that your epic is emitting - do you have a reproduction?
Junior
@Muhammad-Waleed-Hafeez
question- render import lines dynamically.png