
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@launchpadlab/lp-hoc
Advanced tools
A set of React higher order components (HOCs).
Higher order components wrap components to give them extra functionality. For instance, defining a callback to be triggered when a component mounts:
import { onMount } from '@launchpadlab/lp-hoc'
function MyComponent() {
return <div>I'm a component</div>
}
function myMountFunction(props) {
// will be called when component mounts
}
export default onMount(myMountFunction)(MyComponent)
HOCs allow you to replicate the functionality of class-based components using functional components. The HOCs in this library can be combined with those from recompose- in fact, you can think of this library as an extension to that one.
A list of all available HOCs can be found in the documentation.
The use case of HOCs has been largely addressed by the addition of React hooks in v16.8. If possible, we recommend you use hooks instead of HOCs when building new components.
Here's a handy reference for determining which hooks solve for the use-cases of lp-hoc components (corresponding recompose components in parentheses):
getSet (withState) -> useStatemodifyProps (withProps) -> useMemo and useCallbackonMount -> useEffectonUnmount -> useEffectonUpdate -> useEffectwaitFor -> if statementsDocumentation and usage info can be found in docs.md.
This package follows the Opex NPM package guidelines. Please refer to the linked document for information on contributing, testing and versioning.
Along with ES module support, this library supports cherry-picked imports from the lib folder to reduce bundle sizes:
import onUpdate from '@launchpadlab/lp-hoc/lib/onUpdate'
import onMount from '@launchpadlab/lp-hoc/lib/onMount'
You can also combine this feature with babel-plugin-transform-imports to cherry-pick imports by default:
// .babelrc
{
"plugins": [
["transform-imports", {
"@launchpadlab/lp-hoc": {
"transform": "@launchpadlab/lp-hoc/lib/${member}",
"preventFullImport": true
}
}]
]
}
This library uses size-limit to prevent size bloat. The yarn size script is run in CI to check that the package size is under the limit specified in .size-limit.js. For a visualization of this package's relative dependency sizes, you can run yarn size --why.
FAQs
React HOCs
We found that @launchpadlab/lp-hoc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.