A set of utilities for building Redux applications in web extensions. This package was originally named react-chrome-redux. 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. As described in the introduction, there are two pieces to a basic implementation of this package. 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. Implement actions whose logic only happens in the background script (we call them aliases).
Features
- All UI Components follow the same basic flow
- UI Component dispatches action to a Proxy Store
- Proxy Store passes action to background script
- Redux Store on the background script updates its state and sends it back to UI Component
- UI Component is updated with updated state
- Wrap your Redux store in the background page with wrapStore()