You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing about chained actions that seems to make things hard for people is that it is a bit on the verbose side. One thought is to do a better job inferring a value for Args / Captures in the case when that attribute is not defined. The suggestion:
When an action is not the last action in the chain, omitting CaptureArgs is the same as saying CaptureArgs(0).
When the action is the last in the Chain, we infer 'Args' as the final value. I think this is correct since for Path and Local actions we infer Args in the dispatcher so its consistent.
Question
Would we prefer to infer Args(0) over Args for the final? Looking over my code that seems to be more common, although it might just be a side effect of the fact I need to put Args there to signify 'end of chain'
The text was updated successfully, but these errors were encountered:
:Args(0) is much more common for me. I don't think I've ever used :Args. I personally don't have a lot of use cases for passing in a variable number of path parts. It also seems to be more consistent with the :CaptureArgs(0) logic.
One thing about chained actions that seems to make things hard for people is that it is a bit on the verbose side. One thought is to do a better job inferring a value for Args / Captures in the case when that attribute is not defined. The suggestion:
When an action is not the last action in the chain, omitting CaptureArgs is the same as saying CaptureArgs(0).
When the action is the last in the Chain, we infer 'Args' as the final value. I think this is correct since for Path and Local actions we infer Args in the dispatcher so its consistent.
Question
Would we prefer to infer Args(0) over Args for the final? Looking over my code that seems to be more common, although it might just be a side effect of the fact I need to put Args there to signify 'end of chain'
The text was updated successfully, but these errors were encountered: