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 thunk-like action #74

Open
jaredpalmer opened this issue Feb 13, 2018 · 7 comments
Open

Add thunk-like action #74

jaredpalmer opened this issue Feb 13, 2018 · 7 comments

Comments

@jaredpalmer
Copy link
Contributor

No description provided.

@developit
Copy link
Owner

I guess this would just be actions that invoke a callback to signify completion rather than returning a promise?

@jaredpalmer
Copy link
Contributor Author

Yup

@developit
Copy link
Owner

I'm on the fence about this one. I wonder if what we really need is middleware... Right now I'm not sure how we'd be able to support thunks since we already use returned functions as a way to detect promisified actions. Any thoughts on a way to do it? If we could find a solution, the plumbing should be literally just another line here.

@aprilmintacpineda
Copy link

aprilmintacpineda commented Jun 12, 2018

unistore can support this out of the box if it has middleware support or something like that.

@aprilmintacpineda
Copy link

@developit I want to help but I don't know what's on your mind. I can only picture this with an event driven architecture, as far as I can see, unistore is not event driven since we literally fire the actions which are functions instead of firing an event.

@eschaefer
Copy link

@aprilmintacpineda I looked at how redux applies middleware cuz it's nicely documented. I have a proof of concept for generic middleware support in unistore running locally, and will put up a fork soon that hopefully doesn't add too many bytes!

@jaredpalmer jaredpalmer changed the title Add thunk-like action" Add thunk-like action Aug 16, 2018
@eschaefer
Copy link

Hey all, check out #109 for a really basic support for thunks. 🤷‍♂️

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

No branches or pull requests

4 participants