hookstore-logger
v0.2.2
Published
simple logger middleware for hookstore
Downloads
7
Maintainers
Readme
hookstore-logger
redux-logger style middeware for hookstore
Install
$ npm install hookstore-logger -D
# or
$ yarn add hookstore-logger
Usage
import { Provider, applyMiddlewares } from 'hookstore';
import logger from 'hookstore-logger';
const model = {
name: 'foo',
state: {},
actions: {},
};
function App() {
// App component code
}
function Root = () => {
const middlewares = [
logger({ showDiff: true, showTook: true }),
// add other middlewares
];
applyMiddlewares(middlewares);
return <Provider model={model}><App /></Provider>;
}
ReactDOM.render(<Root />, document.querySelector('app'));
Injoy it!