redux-side-effect icon indicating copy to clipboard operation
redux-side-effect copied to clipboard

Feature suggestion: work with time travel

Open mheiber opened this issue 9 years ago • 3 comments
trafficstars

Nice simple library! If I understand correctly, redux-side-effect (like redux-saga, redux-loop, etc) doesn't currently work well with time travel, since replaying actions also re-calls functions that cause side effects. Is that right?

I think there's a good solution, but want to check with you to see if this is a problem first.

mheiber avatar Sep 06 '16 01:09 mheiber

I think you can make it work with time travel by having a few special rules

gregwebs avatar Sep 06 '16 01:09 gregwebs

@gregwebs what do you mean? Thanks for your help as I try to figure this out.

mheiber avatar Sep 06 '16 02:09 mheiber

I think you need to change the code to recognize when you are in development and doing time travelling. You could for example cache the original response from the side effect and not actually invoke the side effect function the next time around but just use the cached response.

gregwebs avatar Sep 11 '16 02:09 gregwebs