Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
iron-connector
Advanced tools
Lightweight multi-instance redux library based on react-redux
Lightweight multi-instance redux library based on react-redux.The main purpose of iron-connector
is to better reuse state logic.
We provide two different ways to construct Redux multi-instance applications, including ironReducer
and Connector
.
The Connector
's method requires:
React
>= 16.8react-redux
>= 7.0ironReducer
's purpose is to strengthen the reducer
, and construct multi-instance redux applications.
you can try ironReducer - Demo
The key code:
const reducer = {
addTodo: ironReducer(originReducer, "addTodo"),
addPush: ironReducer(originReducer, "addPush")
};
function TodoApp() {
return (
<div>
<AddTodo as="addTodo" />
<AddPush as="addPush" />
</div>
);
}
Connector
's purpose is to add Redux
instances dynamically.
you can try Connector - Demo
The key code:
// 根目录store.tsx
import { createStore } from "redux";
import { ironStore, Connecor } from "iron-connector";
// 对redux的createStore增强
const store = ironStore(createStore)(rootReducer);
// 使用Connecor对组件进行封装,绑定动态redux状态
export default () => {
return (
<Connector as="addPush" reducer={reducer} actions={actions}>
<AddPush />
</Connector>
);
};
MIT
FAQs
Lightweight multi-instance redux library based on react-redux
The npm package iron-connector receives a total of 2 weekly downloads. As such, iron-connector popularity was classified as not popular.
We found that iron-connector 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.