Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for redux-observable #26

Open
hackhat opened this issue Aug 11, 2018 · 1 comment
Open

Add support for redux-observable #26

hackhat opened this issue Aug 11, 2018 · 1 comment

Comments

@hackhat
Copy link

hackhat commented Aug 11, 2018

At the moment I cannot use it with redux-observable.

So if I dispatch batched(action1, action2), redux-observable only receives the batchedAction. So not good. I could make the redux-observable to look into the batched actions, but I don't think is his job to do that. For example instead of listening to action1, will listen to

  • batchedAction and checks if inside contains action1, or
  • action1.

I think this is really bad as the epic should not care how a certain action is dispatched and this should be done to all epics because any action could be batched.

@manaflair/redux-batch made it in a way that works with redux-observable, please take a look.

@Flash619
Copy link

Flash619 commented Aug 24, 2019

Per the recipes section of the readme.

"You can add a middleware to dispatch each of the bundled actions. This can be used if other middlewares are listening for one of the bundled actions to be dispatched."

I've tested this together with redux-obervable and redux-observable-requests and it seems to parse each individual action as expected.

Edit

Only issue I'm seeing is the middleware can cause re-renders as it triggers listeners for each action in a batch. Perhaps the middleware could somehow tie into the native redux batch function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants