-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bound Flow functions #1767
Comments
Dunno if recommended, but why not simply:
Since flow is not usable as decorator (not sure why), the above would just become:
Functionally I don't think so, but seems a bit redundant. |
See also #1769 , pushing |
In v6, |
What is the recommended approach for creating bound asynchronous actions?
The docs recommend using flow, but since generators cannot be used with arrow functions it isn't clear how to make sure they are bound correctly. Does it make sense for there to be a
flow.bound
?It looks like it's possible to use
action.bound
on aflow
function, but I'm not sure if that has downsides. Alternatively, you can create a separate action that is bound, and call that from the flow function, but that doesn't seem ideal either.Here's a code sandbox showing the issue (and the action.bound fix): https://codesandbox.io/s/zw7kz7m0vl
The text was updated successfully, but these errors were encountered: