This function is useful when you want to send event without state. I did not find other way to do it with current api other than Command::perform(async {}, |_| Message::MyMessage) which is inconvenient and creates a useless extra future.
New api is Command::dispatch(Message::MyMessage) where
Messages are meant to represent real events that happened. You should not use them to manually run your application logic. Simply define helper functions instead, and call them!
This function is useful when you want to send event without state. I did not find other way to do it with current api other than
Command::perform(async {}, |_| Message::MyMessage)
which is inconvenient and creates a useless extra future.New api is
Command::dispatch(Message::MyMessage)
where