Wrapper to add side effects after transition definition.
Adds a side effect to the transition.
Adds a side effect that only uses the state.