All Projects → ivantsov → Redux Webext

ivantsov / Redux Webext

Redux for WebExtensions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Redux Webext

Extension Create
Create modern cross-browser extensions with no build configuration.
Stars: ✭ 167 (+65.35%)
Mutual labels:  extension, chrome, firefox, webextension, webextensions
Retrotxt
RetroTxt is the WebExtension that turns ANSI, ASCII, NFO text into in-browser HTML
Stars: ✭ 93 (-7.92%)
Mutual labels:  chrome, firefox, webextension, webextensions
Ext Saladict
🥗 All-in-one professional pop-up dictionary and page translator which supports multiple search modes, page translations, new word notebook and PDF selection searching.
Stars: ✭ 8,418 (+8234.65%)
Mutual labels:  extension, chrome, firefox, webextension
Browser
The browser extension vault (Chrome, Firefox, Opera, Edge, Safari, & more).
Stars: ✭ 3,305 (+3172.28%)
Mutual labels:  chrome, firefox, webextension, webextensions
Mue
Fast, open and free-to-use new tab page for modern browsers
Stars: ✭ 56 (-44.55%)
Mutual labels:  extension, chrome, firefox, webextensions
Github Mermaid Extension
A browser extension for Chrome, Opera & Firefox that adds Mermaid language support to Github
Stars: ✭ 170 (+68.32%)
Mutual labels:  extension, chrome, firefox, webextension
Bettertweetdeck
A browser extension to improve TweetDeck with a lot of features
Stars: ✭ 558 (+452.48%)
Mutual labels:  extension, chrome, firefox
Nighttab
A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.
Stars: ✭ 598 (+492.08%)
Mutual labels:  extension, chrome, firefox
Uget Chrome Wrapper
Moved to https://github.com/ugetdm/uget-integrator and https://github.com/ugetdm/uget-extension
Stars: ✭ 74 (-26.73%)
Mutual labels:  extension, chrome, firefox
Web Extension Starter
🖥🔋Web Extension starter to build "Write Once Run on Any Browser" extension
Stars: ✭ 987 (+877.23%)
Mutual labels:  extension, chrome, firefox
Metamask Extension
🌐 🔌 The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
Stars: ✭ 6,585 (+6419.8%)
Mutual labels:  extension, chrome, firefox
News Feed Eradicator
A browser extension that deletes your news feed and replaces it with a nice quote
Stars: ✭ 690 (+583.17%)
Mutual labels:  chrome, firefox, webextensions
Cookie Autodelete
Firefox and Chrome WebExtension that deletes cookies and other browsing site data as soon as the tab closes, domain changes, browser restarts, or a combination of those events.
Stars: ✭ 1,015 (+904.95%)
Mutual labels:  chrome, firefox, webextension
Web Developer
A browser extension that adds various web developer tools to a browser.
Stars: ✭ 532 (+426.73%)
Mutual labels:  extension, chrome, firefox
Webextension Pixiv Toolkit
A web extension for Pixiv
Stars: ✭ 513 (+407.92%)
Mutual labels:  chrome, firefox, webextension
Weibo Picture Store
🖼 新浪微博图床 Chrome/Firefox 扩展,支持同步到微相册
Stars: ✭ 624 (+517.82%)
Mutual labels:  extension, store, chrome
Downthemall
The DownThemAll! WebExtension
Stars: ✭ 512 (+406.93%)
Mutual labels:  firefox, webextension, webextensions
Himawari 8 Chrome
🛰 Experience the latest image from the Himawari, GOES, Meteosat, and DSCOVR satellites
Stars: ✭ 48 (-52.48%)
Mutual labels:  extension, chrome, firefox
Persian Twitter
A WebExtension which improves Twitter & TweetDeck user experience for Persian users
Stars: ✭ 66 (-34.65%)
Mutual labels:  chrome, firefox, webextensions
Scriptsafe
a browser extension to bring security and privacy to chrome, firefox, and opera
Stars: ✭ 434 (+329.7%)
Mutual labels:  extension, chrome, firefox

redux-webext

Build Status codecov npm version

This package allows you to use Redux for managing the state of your WebExtension.

Installation

npm install redux-webext --save

Introduction

Usually WebExtension consists of two basic parts:

  • background page, where you store the data and process it somehow
  • UI pages (e.g. popup or content scripts), where you show the data from background page


As you can see, to provide data between background and UI pages you have to use messages. Or... actually, you don't have to, because of redux-webext:



In a nutshell, redux-webext takes care of communication between background and UI pages using Redux. But there are 2 key things that you should understand:

  • In background page there is Redux store that contains the entire state of your WebExtension. All logic (actions, reducers etc) is placed in background page as well.
  • UI pages have access to the state via their own Redux stores, but there are no real actions or reducers. I said real because UI pages might have functions associated with actions in background page. You can think about it like a proxy that allows you to call background actions from UI pages.

The words above don't make a lot of sense without code, right? So, there's tutorial with example where you can find how to use redux-webext and how it works.

Examples

API

createBackgroundStore(options) - creates Redux store for background page.

Options

  • store - instance of Redux store.
  • actions (optional) - object which keys are types of actions in UI page and values are actions in background page.
  • onDisconnect (optional) - function that will be called on destroying UI store (e.g. right after closing a popup).

Returns the provided store.

Example

const store = createStore(reducer); // real Redux store

const backgroundStore = createBackgroundStore({
    store,
    actions: {
        // "INCREMENT_UI_COUNTER" is a string that will be used as a type of action in UI page
        // "incrementUICounter" is an action is background page
        INCREMENT_UI_COUNTER: incrementUICounter,
        DECREMENT_UI_COUNTER: decrementUICounter
    }
});

createUIStore() - creates Redux store for UI pages.

Returns promise which will be resolved after receiving the current state of background store. And an object with identical to Redux store structure will be passed as resolved result.

Example

async function initApp() {
    const store = await createUIStore();

    ReactDOM.render(
        <Provider store={store}>
            <App/>
        </Provider>,
        document.getElementById('app')
    );
}

initApp();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].