Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@grexie/compose
Advanced tools
Create and use composable functions for React context providers and other wrapper components.
Create and use composable functions for React context providers and other wrapper components.
yarn add @grexie/compose
Create a composable from an existing component, for example a context provider:
import { createComposable } from "@grexie/compose";
const withContextProvider = createComposable(ContextProvider);
Then use the composable with the compose
function:
import { compose } from "@grexie/compose";
const ComposedApp = compose(
withContextProvider1,
withContextProvider2,
...,
withContextProviderN,
App
);
You can chain as many composables together in the call to compose, avoiding the need to chain multiple JSX tags together to compose the App wrapper.
Or alternatively, if your composable function takes props in addition to children:
import { createComposableWithProps, compose } from "@grexie/compose";
const withContextProvider1 =
createComposableWithProps<PropsType>(ContextProvider);
const ComposedApp = compose(
withContextProvider1({ ...props }),
withContextProvider2,
...,
withContextProviderN,
App
);
FAQs
Create and use composable functions for React context providers and other wrapper components.
We found that @grexie/compose 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.