is dispatching from a command an antipattern?

I'm thinking about passing dispatcher to a dispatch payload, in order to dispatch from the command. Is this a bad idea?

Hi @nik0kin, the command dispatcher supports returning new commands. Wouldn't it be suitable for your use case?


execute() {
  // perform your actions...

  return [new AnotherCommand().setPayload({ ... })];

ooohhh, I overlooked that when looking at the dispatcher typing. Thank you!