{"id":49147,"library":"redux-storage-decorator-engines","title":"redux-storage-decorator-engines","description":"A decorator for redux-storage that allows composing multiple storage engines (e.g., localStorage, sessionStorage, cookies) into a single engine. Current stable version is 1.0.7, last updated in 2015. It works by wrapping an array of engines and delegating load/save operations to each. The library is minimal and has no dependencies, but it requires redux-storage and engine packages to be useful. A key warning: if the same state key is loaded from multiple engines, the final state is non-deterministic and a warning is emitted in non-production environments.","status":"maintenance","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/allegro/redux-storage-decorator-engines","tags":["javascript","redux","redux-storage","redux-storage-decorator"],"install":[{"cmd":"npm install redux-storage-decorator-engines","lang":"bash","label":"npm"},{"cmd":"yarn add redux-storage-decorator-engines","lang":"bash","label":"yarn"},{"cmd":"pnpm add redux-storage-decorator-engines","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export only; no named exports.","wrong":"const engines = require('redux-storage-decorator-engines')","symbol":"engines","correct":"import engines from 'redux-storage-decorator-engines'"}],"quickstart":{"code":"import engines from 'redux-storage-decorator-engines';\nimport filter from 'redux-storage-decorator-filter';\nimport createLocalStorageEngine from 'redux-storage-engine-localstorage';\nimport createSessionStorageEngine from 'redux-storage-engine-sessionstorage';\n\nconst localStorageEngine = filter(createLocalStorageEngine('redux'), ['todos']);\nconst sessionStorageEngine = filter(createSessionStorageEngine('redux'), ['visibilityFilter']);\n\nconst storageEngine = engines([\n  localStorageEngine,\n  sessionStorageEngine\n]);\n\n// Optionally add a custom engine for cookies\nimport Cookies from 'js-cookie';\nconst cookieStorage = {\n  load() {\n    const state = { cookie: Cookies.get('cookie') };\n    return Promise.resolve(state);\n  },\n  save() {\n    return Promise.resolve();\n  }\n};\n\nconst combinedEngine = engines([localStorageEngine, sessionStorageEngine, cookieStorage]);","lang":"javascript","description":"Demonstrates how to compose multiple storage engines using the decorator, including a custom cookie engine."},"warnings":[{"fix":"Ensure each engine loads unique keys to avoid non-deterministic behavior.","message":"If the same state key is loaded from more than one storage engine, the final state is non-deterministic and depends on load order.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider migrating to modern state persistence solutions like redux-persist.","message":"This package is part of the legacy redux-storage ecosystem which is no longer actively maintained.","severity":"deprecated","affected_versions":"all"},{"fix":"Write a declaration file or use // @ts-ignore.","message":"The package does not provide TypeScript type definitions; manual type declarations may be needed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.7':30 '2015':34 'allow':13 'array':40 'compos':14 'cooki':21 'current':26 'decor':4,7,107 'deleg':44 'depend':56 'determinist':88 'e.g':18 'emit':93 'engin':5,17,25,42,64,81 'environ':98 'final':83 'javascript':99 'key':70,76 'last':31 'librari':50 'load':78 'load/save':45 'localstorag':19 'minim':52 'multipl':15,80 'non':87,96 'non-determinist':86 'non-product':95 'oper':46 'packag':65 'product':97 'redux':2,10,61,100,102,105 'redux-storag':9,60,101 'redux-storage-decor':104 'redux-storage-decorator-engin':1 'requir':59 'sessionstorag':20 'singl':24 'stabl':27 'state':75,84 'storag':3,11,16,62,103,106 'updat':32 'use':68 'version':28 'warn':71,91 'work':36 'wrap':38","created_at":"2026-06-07T17:00:18.105869+00:00","updated_at":"2026-06-07T17:00:18.105869+00:00","problems":[{"fix":"Use default import: import engines from 'redux-storage-decorator-engines'","cause":"Using named import instead of default import.","error":"TypeError: engines is not a function"},{"fix":"Run 'npm install --save redux-storage-decorator-engines' and ensure the module is in dependencies.","cause":"Package not installed or missing from node_modules.","error":"Cannot find module 'redux-storage-decorator-engines'"},{"fix":"Ensure each engine contributes unique keys to avoid non-deterministic loading.","cause":"Multiple storage engines providing the same state key.","error":"Warning: Duplicate state key 'todos' loaded from multiple engines."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/allegro/redux-storage-decorator-engines","github":"https://github.com/allegro/redux-storage-decorator-engines","docs":null,"changelog":null,"pypi":null,"npm":"redux-storage-decorator-engines","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}