Middleware Hooks

useLogger

useLogger

useLogger will log the action and the associated state. Inspired from redux-logger.

Usage

import { useLogger } from 'middleware-hooks';
const App = () => {
const [store, dispatch] = useLogger(reducer, initialState);
return <h1>Hello World!</h1>;
};

Example

Edit this page on GitHub

On this page