BerkeleyTrue / react-redux-epic

37 stars 13 forks source link

Example Epic #28

Open davidbarratt opened 6 years ago

davidbarratt commented 6 years ago

Could you please add an example epic to the docs? I noticed this line:

renderToString takes your wrappedEpic and your react app and will trigger a render, wait for all of your epics to complete, then trigger a final render.

Does this mean I need to ensure that every epic marks itself as "Complete"? What's the best way to do that?

istvano commented 6 years ago

Hi, did you figure out how to do this. I also think the example app would be great. I am not sure if I need to wrap every epic? if so what do I need to pass to renderToString as I have 50 epics in my app. It is not that clear. Did you make any progress ?

christophediprima commented 6 years ago

You have to wrap you combined epics. That worked pretty well for me except for the issue I just posted here #29

istvano commented 6 years ago

Thanks a lot. It seems to be working fine now.

btw: I have just run into the problem of not being able to use ajax request on the server side using rxjs's ajax. Did you use https://github.com/mcmunder/universal-rxjs-ajax or do you use something else for ajax ?

christophediprima commented 6 years ago

Did you read the issue I linked? #29 :) I use rx-http-request . I also tried to use Observable.from isomorphic-fetch. But I have the same issue...

BerkeleyTrue commented 6 years ago

Apologies for the radio silence.

@davidbarratt Most epics will complete on their own when they receive the complete event from their upstream source, the source being react-redux-epic.

I'll add an example and some edge cases soon.