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

Problem: It's difficult to work with zero or multi-parameter actions #2

Open
bkonkle opened this issue Sep 11, 2016 · 0 comments
Open

Comments

@bkonkle
Copy link
Contributor

bkonkle commented Sep 11, 2016

For example:

update :: Fn2 Id String (Redux.Action Action)
update = mkFn2 action
  where action id title = createAction $ Update id title

clearComplete :: Fn0 (Redux.Action Action)
clearComplete = mkFn0 action
  where action _ = createAction ClearComplete

Having to use uncurried functions like this stinks. Not sure how to solve without middleware, though. Curried functions essentially dispatch a function to the store instead of an action. We could probably use something like thunk to work around this, but that sounds messy and awful. There's got to be a better way.

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

1 participant