When you want catch errors from emitted events you can use onError method
import { Eventrix } from 'eventrix'; import receiversList from './receivers'; const initialState = { users: [], }; const eventrix = new Eventrix(initialState, receiversList); eventrix.onError((error, eventName, eventPayload, currentState) => { console.error(eventName, error); }) export default eventrix;
Last updated 11 months ago