
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
react-native-super-injector
Advanced tools
An 'injectable' react-native component that allows an external component to be injected during run-time while falling back to a default component
💉 An "injectable" react-native component that allows an external component to be injected during run-time while falling back to a default component
The core of react-native-super-injector is rather small and simple. It's sole purpose is to simplify the need of passing along an external component to override the default internal component.
This rose mainly from the issue of developing open-source components, where vast users have different preferred components. The result is the typical "duck" problem -- numerous types and variations available, but they are simply ducks 🦆🦆🦆.
Thus, this component is essentially a high-order component with a strategy pattern in mind. Therefore, as long as the injected component (injectant) implements the same core interface, things will render visually identical. On top of that, we can pass along particular props for added flexibility.
Use react-native-super-injector for building components where there is a strong indication where you suspect the component may be replaced in the future. In addition, where you want to give users greater flexibility without having to touch the core code of your components.
$ yarn add react-native-super-injector
or
$ npm install react-native-super-injector
import Injector from 'react-native-super-injector';
Injector, and include a way to dynamic pass along an optional Injectant component and properties. This will allow a component to overload default implementation, and add extra props if needed.
const myComponent = (props) => {
const imageProps = {
source: {
uri: "https://test.com/image1.jpeg"
},
resizeMode: "contain"
};
render() {
return (
<Injector
defaultComponent={Image}
defaultProps={imageProps}
injectant={props.customComponent}
injectantProps={props.customComponentProps}
/>
)
}
}
myComponent will render Image by default, but users can now have the ability to use their own third-party Image component if needed.| Property | Type | Description |
|---|---|---|
| defaultComponent | func - react component | A default component to be used unless a injectant is specified |
| defaultProps | object | Default properties that are applied in both components |
| injectant | func - react component | A component that will override the defaultComponent for rendering. Note: this component should abide by a same core interface. |
| injectantProps | object | Props that will assign over defaultProps and be applied to the injectant rendering. |
These are example repositories / components that are currently using react-native-super-injector.
react-native-super-masonry - A component that handles masonry~ish layoutsWhile the core of this module is small, feel free to submit issues or provide suggestions on improving usability.
MIT © Aayush Kapoor
FAQs
An 'injectable' react-native component that allows an external component to be injected during run-time while falling back to a default component
We found that react-native-super-injector 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.