Skip to content

Change the IO-based actions to require an IO.t(action, Void.t) #25

Description

@andywhite37

@mlms13 pointed out that sometimes you do IO-based updates in a reducer (UpdatedWithIO, etc.), but the IO can't fail (has an error type of Void.t). The framework is requiring you to return an IO.t(action, action) right now, and I did that mainly for convenience, but it probably makes sense to change the expected type to IO.t(action, Void.t) to indicate that you have handled the errors (by changing them to a successful action), and to also allow for IO actions that can't fail.

This would be a breaking change, and would require users to update their code everywhere, but the change should be very simple to make. I.e. using IO.handleError.

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

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions