Change the IO-based actions to require an IO.t(action, Void.t)
#25
Labels
enhancement
New feature or request
IO.t(action, Void.t)
#25
@mlms13 pointed out that sometimes you do IO-based updates in a reducer (
UpdatedWithIO
, etc.), but theIO
can't fail (has an error type ofVoid.t
). The framework is requiring you to return anIO.t(action, action)
right now, and I did that mainly for convenience, but it probably makes sense to change the expected type toIO.t(action, Void.t)
to indicate that you have handled the errors (by changing them to a successful action), and to also allow forIO
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
.The text was updated successfully, but these errors were encountered: