{"id":24196273,"url":"https://github.com/dilatorily/redux-ipc-electron","last_synced_at":"2026-05-06T15:32:55.337Z","repository":{"id":57350889,"uuid":"83005072","full_name":"Dilatorily/redux-ipc-electron","owner":"Dilatorily","description":"Redux IPC Middleware for Electron","archived":false,"fork":false,"pushed_at":"2017-02-26T06:51:17.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T07:46:11.481Z","etag":null,"topics":["electron","ipc","middleware","redux"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dilatorily.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-24T05:32:04.000Z","updated_at":"2017-11-28T05:19:20.000Z","dependencies_parsed_at":"2022-09-16T21:12:33.961Z","dependency_job_id":null,"html_url":"https://github.com/Dilatorily/redux-ipc-electron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dilatorily%2Fredux-ipc-electron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dilatorily%2Fredux-ipc-electron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dilatorily%2Fredux-ipc-electron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dilatorily%2Fredux-ipc-electron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dilatorily","download_url":"https://codeload.github.com/Dilatorily/redux-ipc-electron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629736,"owners_count":19993708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","ipc","middleware","redux"],"created_at":"2025-01-13T19:24:17.758Z","updated_at":"2026-05-06T15:32:55.279Z","avatar_url":"https://github.com/Dilatorily.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-ipc-electron\n[![NPM version](https://img.shields.io/npm/v/redux-ipc-electron.svg?style=flat)](https://www.npmjs.com/package/redux-ipc-electron)\n[![Build Status](https://travis-ci.org/Dilatorily/redux-ipc-electron.svg?branch=master)](https://travis-ci.org/Dilatorily/redux-ipc-electron)\n[![codecov](https://codecov.io/gh/Dilatorily/redux-ipc-electron/branch/master/graph/badge.svg)](https://codecov.io/gh/Dilatorily/redux-ipc-electron)\n\nRedux IPC Middleware for Electron\n\n## Installation\nUse NPM to install this module:\n```bash\n$ npm install --save redux-ipc-electron\n```\n\n## Usage\nThis library uses Electron's IPC to synchronizes the Redux store between the main process and the renderer process(es).\n\nUse the Redux middleware in the renderer Redux store.\n```javascript\nimport { createMiddleware as ReduxIPCMiddleware } from 'redux-ipc-electron';\n\n// ...\ncreateStore(reducers, preloadedState, applyMiddleware(thunk, ReduxIPCMiddleware(), logger));\n```\n\nListen to the IPC events in the main process.\n```javascript\nimport { createMainListeners } from 'redux-ipc-electron';\n\n// ...\ncreateMainListeners();\n```\n\nThat's it! The main process will now receive the renderer's Redux store on every action.\n\n## API\nThis library exposes 4 functions in its API.\n\n### initializeStore([preloadedState])\nUse this function in the main process to initialize the Redux store in the main process. It returns the main process Redux store.\n\nThe `preloadedState` will create the store using it as its initial value.\n\n### createMainListeners([onSync])\nUse this function in the main process to listen to Electron IPC events.\n\nThe `onSync` callback will be called with the updated Redux store on every IPC sync events.\n\n### getMainState([identifier])\nUse this function in the renderer process to get a part of the main process Redux store identified by the `identifier` parameter.\n\nA default `identifier` will be used if it is omitted.\n\n### createMiddleware([identifier], [predicate])\nUse this function in the renderer process to create the middleware used in the Redux store.\n\nThe `identifier` should be used if there are multiple renderer processes. A default `identifier` will be used if it is omitted.\n\nThe `predicate` function is called with the store's `state` as its parameter. An identity function will be used if it is omitted.\n\n## [License](LICENSE)\nThis repository is open source and distributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilatorily%2Fredux-ipc-electron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdilatorily%2Fredux-ipc-electron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilatorily%2Fredux-ipc-electron/lists"}