UNPKG

@platform/cell.tmpl

Version:

Template generator for CellOS.

19 lines (16 loc) 364 B
import { t } from '../../common'; /** * State transforms (reducers). */ export function init(args: { store: t.IAppStore }) { const { store } = args; /** * REDUCE: Update error. */ store.on<t.IAppErrorEvent>('APP:__NAME__/error').subscribe((e) => { e.change((state) => { const error = e.payload; state.error = error; }); }); }