
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
compose-components
Advanced tools
Combine multiple React components (like providers) while maintaining fully typed props support. Up to **10 times faster** than using `cloneElement`.
Combine multiple React components (like providers) while maintaining fully typed props support. Up to 10 times faster than using cloneElement.
pnpm install compose-components
import { ComposeComponents, composeComponents } from "compose-components";
const App = () => (
<ComposeComponents
renderComponents={composeComponents(
[PaletteProvider, { mode: "light" }],
[LayoutProvider, { layout: "default" }],
[SizingProvider, { size: "md" }],
[TypographyProvider, { font: "sans" }],
)}
>
<div>App</div>
</ComposeComponents>
);
declare function PaletteProvider({ children }: React.PropsWithChildren<{ mode: "light" | "dark" }>): React.ReactNode;
declare function LayoutProvider({ children }: React.PropsWithChildren<{ layout: "default" | "full" }>): React.ReactNode;
declare function SizingProvider({ children }: React.PropsWithChildren<{ size: "sm" | "md" | "lg" }>): React.ReactNode;
declare function TypographyProvider({ children }: React.PropsWithChildren<{ font: "sans" | "serif" }>): React.ReactNode;
Since cloneElement is not used, this approach is nearly 10x faster than the version that uses cloneElement.
compose-components [ξ main][+][π¦ v0.0.0][ξ v22.6.0]
β― pnpm benchmark
> compose-components@0.0.0 benchmark
> pnpm -F "./benchmark" run start
> benchmark@0.0.0 start compose-components/benchmark
> tsx ./main.tsx
βββββββββββ¬βββββββββββββββββββββββββ¬ββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬ββββββββββ
β (index) β Task Name β ops/sec β Average Time (ns) β Margin β Samples β
βββββββββββΌβββββββββββββββββββββββββΌββββββββββββββΌββββββββββββββββββββΌβββββββββββΌββββββββββ€
β 0 β 'with cloneElement' β '222,705' β 4490.229389930139 β 'Β±0.25%' β 66812 β
β 1 β 'without cloneElement' β '2,049,821' β 487.8472469985147 β 'Β±0.35%' β 614947 β
βββββββββββ΄βββββββββββββββββββββββββ΄ββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄ββββββββββ
FAQs
Combine multiple React components (like providers) while maintaining fully typed props support. Up to **10 times faster** than using `cloneElement`.
The npm package compose-components receives a total of 1 weekly downloads. As such, compose-components popularity was classified as not popular.
We found that compose-components demonstrated a healthy version release cadence and project activity because the last version was released less than 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authoritiesβ publishing activity, highlighting trends and transparency across the CVE ecosystem.