Logger

Output the result of all actions to the console.

Installation

npm install --save @prodo/logger

Add to your model

// src/model.ts
import loggerPlugin from "@prodo/logger";
// ...
export const model = createModel<State>().with(loggerPlugin);

Config

Items added to the createStore config.

export interface LoggerConfig {
logger?: boolean;
}

logger

boolean that indicates whether or not logging is enabled. Defaults to false.

const { Provider } = model.createStore({
logger: true,
initState: {
/* ... */
},
});