{"repo":"tshaddix/webext-redux","free":true,"listed":false,"github":"https://github.com/tshaddix/webext-redux","clone":"git clone https://github.com/tshaddix/webext-redux.git","description":"A set of utilities for building Redux applications in Web Extensions.","language":"JavaScript","stars":1236,"topics":["chrome-extension","redux","redux-application","redux-store","web-extension","react-chrome-redux","react-chrome-extension"],"license":"MIT","category":"ui-components","readme_excerpt":"WebExt Redux A set of utilities for building Redux applications in web extensions. This package was originally named react-chrome-redux . [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] Installation This package is available on npm: Overview webext-redux allows you to build your Web Extension like a Redux-powered webapp. The background page holds the Redux store, while Popovers and Content-Scripts act as UI Components, passing actions and state updates between themselves and the background store. At the end of the day, you have a single source of truth (your Redux store) that describes the entire state of your extension. All UI Components follow the same basic flow: 1. UI Component dispatches action to a Proxy Store. 2. Proxy Store passes action to background script. 3. Redux Store on the background script updates its state and sends it back to UI Component. 4. UI Component is updated with updated state. Basic Usage (full docs here) As described in the introduction, there are two pieces to a basic implementation of this package. 1. Add the Proxy Store to a UI Component, such as a popup 2. Wrap your Redux store in the background page with wrapStore() That's it! The dispatches called from UI component will find their way to the background page no problem. The new state from your background page will make sure to find its way back to the UI components. [!NOTE] createWrapStore() ensures webext-redux can handle events when the service worker","default_branch":null,"files":null,"tree":[],"storefront":"/r/tshaddix","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tshaddix/webext-redux/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}