{"library":"redux-state-sync","title":"Redux State Sync","description":"A lightweight middleware for syncing Redux state across browser tabs using the Broadcast Channel API with a fallback via pubkey's broadcast-channel. Current stable version 3.1.4. Released under MIT license, maintained actively. Key differentiator: minimal configuration, automatic tab synchronization, and built-in state initialization from other tabs. Incompatible with functions in action payloads due to structured clone algorithm.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install redux-state-sync"],"cli":null},"imports":["import { createStateSyncMiddleware, initMessageListener, initStateWithPrevTab, withReduxStateSync } from 'redux-state-sync';","import { initMessageListener } from 'redux-state-sync';","import { withReduxStateSync } from 'redux-state-sync';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { createStore, applyMiddleware, combineReducers } from 'redux';\nimport { createStateSyncMiddleware, initStateWithPrevTab, withReduxStateSync } from 'redux-state-sync';\n\nconst config = { blacklist: ['TOGGLE_TODO'] };\nconst middlewares = [createStateSyncMiddleware(config)];\n\nconst rootReducer = combineReducers({\n  todos: (state = [], action) => state,\n  visibilityFilter: (state = 'SHOW_ALL', action) => state\n});\n\nconst store = createStore(\n  withReduxStateSync(rootReducer),\n  applyMiddleware(...middlewares)\n);\n\ninitStateWithPrevTab(store);\n\n// Now dispatch actions normally; other tabs will sync automatically","lang":"typescript","description":"Shows full setup: create middleware, wrap reducer, init state from previous tab, and blacklist an action type.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}