
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
This package still has lots of rough edges (specifically, middlewares/actions that require History APIs, etc.), please use it with caution.
Separate app business logic from the main thread, leaving only the UI and animation stuffs. Here's a general idea how apps would work with workux:
For local state:
For remote state:
Please note that Redux and Lodash are peer dependencies. If you're using Webpack, you will need worker-loader as well.
$ yarn add workux redux lodash worker-loader
Exports:
applyProxyMiddlewarecreateProxyStorecreateWorkerStoreTypescript user? You're in luck! This package is written in Typescript!
applyProxyMiddlewareSimilar to Redux's applyMiddleware but for middlewares that need access to APIs that cannot be accessed from web workers. For example, react-router-redux.
// source/main/index.js
import { createRouterMiddleware } from "@regroup/redux";
import createBrowserHistory from "history/createBrowserHistory";
import { applyProxyMiddleware } from "workux";
const browserHistory = createBrowserHistory();
const routerMiddleware = createRouterMiddleware(browserHistory);
const middleware = [ routerMiddleware ];
// proxyEnhancer is then passed on to `createProxyStore`
const proxyEnhancer = applyProxyMiddleware(...middleware);
createProxyStoreSimilar to Redux store. This proxy store listens to redux store in worker for updates and dispatches actions accordingly.
// source/main/index.js
import ReduxWorker from "worker-loader!../workers/redux";
const worker = new ReduxWorker();
// proxyEnhancer comes from `applyProxyMiddleware`
const reduxProxyStore = createProxyStore(worker, proxyEnhancer);
reduxProxyStore.ready(() => {
// do whatever you need to do
// like render React app, etc.
});
createWorkerStoreListens to redux store changes and update proxy store accordingly. It also listens to action dispatches from proxy store and dispatches actions to actual store.
// source/workers/redux/index.js
import { applyMiddleware, createStore } from "redux";
import { createLogger } from "redux-logger";
import { createWorkerStore } from "workux";
import rootReducer from "./reducers";
const loggerMiddleware = createLogger();
const middlewares = [ loggerMiddleware ];
// up to this point, it's all normal Redux store.
const store = createStore(rootReducer, applyMiddleware(...middlewares));
createWorkerStore(store);
applyProxyMiddleware to create a proxy enhancer.This package is MIT licensed.
FAQs
Use Redux in Web Worker
We found that workux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.