
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
HOC that helps you visualize and detect unnecessary rendering and performance issues in React.
perf-hoc (previously lcHOC) is a HOC (higher order component) in React that visualize rendering and logs helpful information.
Enhance each component you want to study with perfHOC and every time that component updates, a green flash wraps the component (much like paint flashing in devtools) and debugging information is logged to the console.
// Step 1: Install
npm install perf-hoc --save-dev;
// Step 2: Import
import perfHOC from 'perf-hoc';
// Step 3: Enhance
// by decorating
@perfHOC
class componentToStudy extends Component { ...
// or by wrapping
export default perfHOC(componentToStudy);
{
log: {
use: true,
expanded: false,
renderCount: true,
state: true,
props: true,
timings: true
},
flash: true
}
You can customize perfHOC by overriding the default settings object above. Example below.
// Decorating with customization
@perfHOC({flash: false, log: {state: false}})
// Wrapping with customization
perfHOC(componentToStudy, {
flash: false,
log {
state: false
}
});
If you have ideas on how to improve this component feel free to request a feature or submit a pull request!
FAQs
HOC that helps you visualize and detect unnecessary rendering and performance issues in React.
The npm package perf-hoc receives a total of 2 weekly downloads. As such, perf-hoc popularity was classified as not popular.
We found that perf-hoc 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.