stateless icon indicating copy to clipboard operation
stateless copied to clipboard

add args to Transition

Open okhowang opened this issue 3 years ago • 5 comments

related #16

okhowang avatar Jun 01 '21 03:06 okhowang

Can you specify why you need the arguments in the Transition? They are normally already passed in the function call-backs.

qmuntal avatar Jun 03 '21 18:06 qmuntal

I want write log once state changed for debugging state machine. And args is the detail info of transition.

okhowang avatar Jun 03 '21 18:06 okhowang

I'm hesitant to add the Arguments property to Transition. It does make sense but there are already many callbacks whose parameters are a transition and the arguments, so it would be confusing to have the arguments in both place.

Yet your use case is valid, so I will think on a way to cover it. Other proposals are also welcomed.

qmuntal avatar Jun 13 '21 19:06 qmuntal

@qmuntal is any better way here?

okhowang avatar Aug 03 '22 10:08 okhowang