
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Flux Standard Action utilities for Redux.
npm install --save redux-fsa
createAction(type, actionCreator)Wraps an action creator so that its return value is the payload of a Flux Standard Action. If no action creator is passed, or if the action creator is not a function, the identity function is used.
Example:
let increment = createAction('INCREMENT', amount => amount);
// same as
increment = createAction('INCREMENT');
expect(increment(42)).to.deep.equal({
type: 'INCREMENT',
payload: 42
});
handleAction(type, reducer | reducerMap)Wraps a reducer so that only handles Flux Standard Actions of a certain type.
If a single reducer is passed, it is used to handle both successful and failed actions. You can use this form if you know a certain action will always be a success, like the increment example above.
Otherwise, you can specify reducers for success and error:
handleAction('FETCH_DATA', {
success(state, action) {...}
error(state, action) {...}
});
handleActions(reducerMap, ?defaultState)Creates multiple reducers using handleAction() and combines them into a single reducer that handles multiple actions. Accepts a map where the keys are the passed as the first parameter to handleAction() (the action type), and the values are passed as the second parameter (either a reducer or reducer map).
The optional second parameter specifies a default or initial state, which is used when undefined is passed to the reducer.
(Internally, handleActions() works by applying multiple reducers in sequence using reduce-reducers.)
Example:
const reducer = handleActions({
INCREMENT: (state, action) => ({
counter: state.counter + amount.
}),
DECREMENT: ({ counter }, { payload: amount }) => ({
counter: counter - amount
})
}, { counter: 0 });
Use redux-fsa in combination with FSA-compliant libraries.
FAQs
Flux Standard Action utlities for Redux
We found that redux-fsa 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.