Socket
Socket
Sign inDemoInstall

reduxed-chrome-storage

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reduxed-chrome-storage

Redux interface to chrome.storage, the only way to get Redux working in event-driven (non-persistent) Chrome extensions


Version published
Weekly downloads
236
increased by61.64%
Maintainers
1
Weekly downloads
 
Created
Source

Reduxed Chrome Storage

Redux interface to chrome.storage. The only way to get Redux working in event-driven (non-persistent) Chrome extensions (aside from full reproduction of the Redux code).

Installation

With NPM:

npm install reduxed-chrome-storage

Usage

Standard way (Promises):

// Note: the usage is the SAME for ANY extension component
// (background or content script or popup - no matter)

import { createStore } from 'redux';
import storeCreatorFactory from 'reduxed-chrome-storage';
import reducer from './reducer';
/* global chrome */

const storeCreator = storeCreatorFactory({ createStore, chrome });
storeCreator(reducer).then(store => {
  const state = store.getState();
  ...
});

Advanced way (async/await):

...
async () => {
  const storeCreator = storeCreatorFactory({ createStore, chrome });
  const store = await storeCreator(reducer);
  ...
}
...
One-liner:
...
async () => {
  const store = await storeCreatorFactory({ createStore, chrome }) (reducer);
  ...
}
...

License

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 11 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc