
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Redux is a very simple framework that helps you build javascript applications. Sometimes this simplicity could cause problems because of:
Fredux is a utility library to make the development process of redux applications faster and easier. Fredux provides some conventions and tools to solve the above-mentioned problems.
npm install fredux
Add the promiseActionMiddleware to the store
import { promiseActionMiddleware } from "fredux";
const store = createStore(reducer, applyMiddleware(promiseActionMiddleware));
Use the fredux versioned promise action middleware if you want to handle context changes, for example a navigation to another page.
When an action involves a context change, the middleware cancels all pending promise actions which have been dispatched in previous versions.
Be aware that this middleware takes the version selector as the first parameter to allow the version reducer to be anywhare in the reducer tree.
import { versionedPromiseActionMiddleware } from "fredux";
const selector = state => state.version;
const store = createStore(reducer, applyMiddleware(
versionedPromiseActionMiddleware(selector), versionMiddleware));
Combine the reducer
import { version } from "fredux";
const reducer = combineReducers({ version, otherStuff });
import { PROMISE_CALL } from "fredux";
export const getMessage(id) {
return {
[PROMISE_CALL]: () => yourApiCall(id),
type: "MESSAGE"
};
}
Both middlewares will:
import { PROMISE_CALL } from "fredux";
export const getMessage(id) {
return {
[PROMISE_CALL]: () => yourApiCall(id).then(r => normalize(r, schema)),
type: "MESSAGE"
};
}
Checks if the given action is a fredux action
import { isFreduxAction } from "fredux";
isFreduxAction(action);
FAQs
Fabulous Redux
We found that fredux 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.