As implemented in #1272, the onMessageDismiss prop is a callback that receives the message to be dismissed id.
This is consistent to how frontend apps have been using this kind of component, but requires duplicating extra logic in order to determine which message was dismissed.
For next major release we want to change this so that the whole message is passed to the callback.