async fn apply(state: &AppState, events: &[Event]) -> Result<(), String>
Apply events to the store and publish them; the first error the reducer returned, if any, instead.
events