{"id":18727,"library":"redux-logdown","title":"redux-logdown","description":"A Redux logger middleware built on top of logdown, providing localStorage.debug support for enabling/disabling store logging. Current stable version is 1.0.4. Released as needed for minor fixes. Key differentiator from redux-logger: native localStorage.debug integration for toggling logging without code changes. Uses logdown for colorful, grouped console output with optional diff display.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/caiogondim/redux-logdown.js","tags":["javascript"],"install":[{"cmd":"npm install redux-logdown","lang":"bash","label":"npm"},{"cmd":"yarn add redux-logdown","lang":"bash","label":"yarn"},{"cmd":"pnpm add redux-logdown","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core logging engine; redux-logdown is a wrapper around logdown for Redux middleware format.","package":"logdown","optional":false},{"reason":"Peer dependency for middleware compatibility; required to create and apply the middleware.","package":"redux","optional":false}],"imports":[{"note":"Package exports a single function; using named import will fail.","wrong":"const reduxLogdown = require('redux-logdown').default","symbol":"default","correct":"import reduxLogdown from 'redux-logdown'"},{"note":"With CJS, require returns the function directly without destructuring.","wrong":"const { reduxLogdown } = require('redux-logdown')","symbol":"reduxLogdown","correct":"const reduxLogdown = require('redux-logdown')"},{"note":"Package does not export types; use with 'allowSyntheticDefaultImports' in tsconfig.","wrong":"import * as reduxLogdown from 'redux-logdown'","symbol":"default (TypeScript)","correct":"import reduxLogdown from 'redux-logdown'"}],"quickstart":{"code":"import { createStore, applyMiddleware } from 'redux';\nimport reduxLogdown from 'redux-logdown';\n\nconst logger = reduxLogdown('myStore', { diff: true });\nconst store = createStore(\n  (state = { count: 0 }, action) => {\n    switch (action.type) {\n      case 'INCREMENT':\n        return { count: state.count + 1 };\n      default:\n        return state;\n    }\n  },\n  applyMiddleware(logger)\n);\n\nstore.dispatch({ type: 'INCREMENT' });","lang":"javascript","description":"Shows basic Redux setup with redux-logdown middleware that logs actions and state diff."},"warnings":[{"fix":"Set localStorage.debug = 'myStore' in browser console or configure at runtime.","message":"Logging disabled by default unless localStorage.debug is set for the namespace.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure first argument is a string and second is an object with diff boolean.","message":"The middleware function expects a string namespace and an options object; passing incorrect arguments may cause runtime errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to redux-logger or other actively maintained loggers.","message":"Package is based on logdown, which is no longer actively maintained.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use 'import reduxLogdown from 'redux-logdown' instead of 'import { reduxLogdown } from 'redux-logdown'","cause":"Using named import instead of default import in ESM.","error":"TypeError: reduxLogdown is not a function"},{"fix":"Run 'npm install logdown' or 'yarn add logdown'","cause":"Missing dependency logdown; redux-logdown lists it as a dependency but sometimes install fails.","error":"Error: Could not find module 'logdown'"},{"fix":"Correct usage: applyMiddleware(reduxLogdown('namespace'))","cause":"Applying middleware incorrectly, e.g., passing middleware instance where function expected.","error":"Uncaught TypeError: Cannot read property 'apply' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}