workflow-swift icon indicating copy to clipboard operation
workflow-swift copied to clipboard

[swift] Pass workflow to WorkflowActions

Open zach-klippenstein opened this issue 6 years ago • 0 comments

It's come up a couple of times, at least in Kotlin, that WorkflowActions get the state of the current workflow but not its props. Since we consider props to be part of the workflow's overall "state", it seems unintuitive that we only pass part of that to actions.

The reason for not doing this was, initially, to discourage side effects from being performed in actions. However, we realized that is too restrictive (see this Slack discussion).

Note for Swift this means passing the Workflow value itself into the action, since there's no separate props type.

Swift version of square/workflow-kotlin#56.

zach-klippenstein avatar Jan 27 '20 07:01 zach-klippenstein