
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
redux-minimal-code-async-actions
Advanced tools
Redux middleware for minimalizing async action boilerplate.
Coding async actions with redux is complicated and requires a vast amount of code around every async need. Even with libraries like redux-saga and redux-thunk the amount of code is significant. One would need to create action types for async call steps (inProgress, success, error) and write boilerplate code around it for every async call. This package reduces this code significantly using a redux middleware it exposes.
npm i --save redux-minimal-code-async-actions
Add middleware to your store:
import {asyncActionsMiddleware} from 'redux-minimal-code-async-actions'
const enhancers = [];
const middleware = [
asyncActionsMiddleware,
];
const composedEnhancers = compose(
applyMiddleware(...middleware),
...enhancers
);
const store = createStore(
myReducer,
composedEnhancers,
);
//When you want to make an async action create an action
//With the following structure:
const getSomethingAsync ={
type : "GET_SOMETHING",
async : true,
httpMethodToInvoke : methodWhichReturnsPromise,
onErrorHandler : errorHandler,
params : [param1,param2]
}
The async:true param is a flag notifying the middleware to act upon this action. The middleware then works as following:
Use the generateInProgressActionTypeName, generateSuccessActionTypeName and generateErrorActionTypeName helper methods to generate action types for different states of the async request and reduce them
import {generateInProgressActionTypeName, generateSuccessActionTypeName, generateErrorActionTypeName, } from 'redux-minimal-code-async-actions';
...
case generateSuccessActionTypeName("GET_SOMETHING"): {
return {
...state,
["something"] : action.somethingResult
}
}
FAQs
minimal boilerplate async redux actions
We found that redux-minimal-code-async-actions 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.