
Product
Rubygems Ecosystem Support Now Generally Available
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
redux-reactors
Advanced tools
A small library (~20 loc) for creating action/reducer combinations, also known as reactors.
$ npm install redux-reactors --save
import {reactorEnhancer} from 'redux-reactors';
import {createStore, compose} from 'redux';
// ...
const store = createStore(reducer, initialState, compose(reactorEnhancer, ...otherEnhancers));
import {createReactor} from 'redux-reactors';
export const incrementReactor = createReactor('INCREMENT', (state, action) => {
return Object.assign({}, {
counter: state.counter + action.payload,
state,
});
});
import {incrementReactor} from './my-reactors';
import {connect} from 'react-redux';
function MyComponent(props) {
const {increment, counter} = props;
return (
<div>
<div>The count is {counter}</div>
<button onClick={() => increment(1)}>Increment by one</button>
<button onClick={() => increment(2)}>Increment by two</button>
</div>
);
}
const mapStateToProps = (state) => {
return {
counter: state.counter,
};
};
// Since createReactor returns an action creator,
// you can use it easily with mapDispatchToProps
const mapDispatchToProps = {
increment: incrementReactor,
};
export default connect(mapStateToProps, mapDispatchToProps)(MyComponent);
FAQs
A small library for creating action/reducer combinations.
The npm package redux-reactors receives a total of 151 weekly downloads. As such, redux-reactors popularity was classified as not popular.
We found that redux-reactors 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
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
Research
The Socket Research Team investigates a malicious npm package that appears to be an Advcash integration but triggers a reverse shell during payment success, targeting servers handling transactions.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.