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

Feature Request: Pure actions that don't require a middleware #31

Closed
bobbydixit opened this issue Mar 17, 2017 · 11 comments
Closed

Feature Request: Pure actions that don't require a middleware #31

bobbydixit opened this issue Mar 17, 2017 · 11 comments

Comments

@bobbydixit
Copy link

It would be better if all actions were pure. i.e. not dispatching any other action so that user can use the library without any middleware. or even when user is using some other middleware like redux-saga. even then they should be able to use the library

@LouisBarranqueiro LouisBarranqueiro self-assigned this Mar 25, 2017
@LouisBarranqueiro
Copy link
Owner

Hey @bobbydixit, I currently don't have time to do that. Could you give it a try?

@bobbydixit
Copy link
Author

@LouisBarranqueiro I am busy this week will give it a shot next week

@gabrielrtakeda
Copy link

gabrielrtakeda commented Mar 30, 2017

+1 for this 😄

It would be great to not have the dependency of a specific middleware.

@bobbydixit
Copy link
Author

bobbydixit commented Apr 8, 2017

@LouisBarranqueiro the only solution I can think of is to move all the logic that's there in actions in src/store/notifications.js to a component, it might involve modification of components and addition of extra states, do you have any issue with this approach, if none then I will start working on it

@LouisBarranqueiro
Copy link
Owner

what are the problems that you encounter?

@bobbydixit
Copy link
Author

@LouisBarranqueiro
I have made the actions pure
#35

But there is an issue in making the actions pure
https://github.com/LouisBarranqueiro/reapop/pull/35/files#diff-f47aa5e84c4ac474ee15b86e589c6779R40
Implementation for update notification will change
Notification object won't be returned directly instead it would be inside payload
let me know if you have an issue with this implementation.

I wl modify the test after we have finalized implementation for update notification

@JonnyHeavey
Copy link

Would love to see this improvement

@LouisBarranqueiro LouisBarranqueiro removed their assignment Mar 8, 2018
@LouisBarranqueiro
Copy link
Owner

I'm thinking about this, not decided yet but to take the right decision regarding the implementation I would like to understand why you need pure actions? Do you use redux-saga? or another middleware?
Could you please update this issue with this template https://github.com/LouisBarranqueiro/reapop/issues/new?assignees=LouisBarranqueiro&labels=&template=feature-request---improvement.md ? @bobbydixit

Could you please do the same @JonnyHeavey by commenting on this issue?

@brandondurham
Copy link

I was so set on this package until I saw that it requires Thunk middleware. That isn’t an option in my case. I don’t think I would have set it up that way even if it were. It’s an odd requirement.

I may be able to help with this change if anyone wants to pair up! Lemme know.

@LouisBarranqueiro
Copy link
Owner

This will be done in the new version. More information in #308

@LouisBarranqueiro
Copy link
Owner

I just released the v3.0.0 of Reapop. This is done. :)

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

5 participants