Skip to content

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

Description

@bkonkle

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions