New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-performify

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-performify

A lightweight React performance toolkit that gives developers easy-to-use hooks and utilities to measure, optimize, and visualize component performance.

latest
Source
npmnpm
Version
0.0.7
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

⚡ React Performify

license issues typescript react

A lightweight React performance toolkit that gives developers easy-to-use hooks and utilities to measure, optimize, and visualize component performance. Its goal is to make performance management as easy as state management — all using clean, composable hooks.

🚀 Features

  • 🧠 Smart utilities — abstract common React logic into reusable hooks
  • 🪶 Lightweight — fast, efficient, and easy to integrate
  • ⚙️ TypeScript support — fully typed API
  • 🧩 Composable — integrate easily into existing code
  • 🔧 Framework agnostic — works with any React setup (Vite, CRA, Next.js, etc.)

📘 Documentation

Comprehensive documentation is available here

👉 Documentation

📘 Storybook

Explore all hooks interactively on Storybook:
👉 Live Demo

📦 Installation

Once published to npm:

npm install react-performify
# or
yarn add react-performify

If you’re developing locally and want to test it

# Inside react-performify/
npm link

# In your target React project:
npm link react-performify

🧠 Available Hooks

Hook NameDescription
useDebouncedEffectRuns effect after delay
useLazyMemoLazily memoizes value
useMemoizedCallbackMemoizes callback to avoid recreation
usePerformanceMonitorMonitors performance metrics
usePerformanceOverlayDisplays performance overlay
usePerformanceStatsTracks render statistics
useRenderCountCounts component renders
useStableObjectKeeps object reference stable
useThrottledCallbackThrottles callback execution
useVirtualListOptimizes rendering large lists
useWhyDidYouRenderLogs prop changes between renders

🧩 Example Usage

import React, { useState } from "react";
import type { Meta, StoryObj } from "@storybook/react";
import { usePerformanceOverlay } from "../usePerformanceOverlay";

const PerfOverlayDemo = () => {
    const [enabled, setEnabled] = useState(true);
    usePerformanceOverlay(enabled, 500, "bottom-left");

    return (
        <div style={{ padding: "20px" }}>
            <h3>usePerformanceOverlay Hook Demo</h3>
            <p>
                Toggle the overlay below. When enabled, an FPS counter appears
                on the bottom-left corner of your screen.
            </p>
            <button
                onClick={() => setEnabled(!enabled)}
                style={{
                    background: enabled ? "#d33" : "#3d3",
                    color: "white",
                    border: "none",
                    padding: "10px 16px",
                    borderRadius: "6px",
                    cursor: "pointer",
                }}
            >
                {enabled ? "Disable Overlay" : "Enable Overlay"}
            </button>
        </div>
    );
};

const meta: Meta<typeof PerfOverlayDemo> = {
    title: "Hooks/usePerformanceOverlay",
    component: PerfOverlayDemo,
};

export default meta;
type Story = StoryObj<typeof PerfOverlayDemo>;

export const Default: Story = {
    render: () => <PerfOverlayDemo />,
};

Development

git clone https://github.com/Shakir-Afridi/react-performify.git
cd react-performify
npm install

Start development mode

npm run dev

Build for production

npm run build

To test it in another project locally

npm link
# then in your test project:
npm link react-performify

🧾 License

This project is licensed under the MIT License.

💡 Contributing

Contributions are welcome! If you’d like to add new hooks or fix bugs, please open an issue or submit a pull request.

# Fork & clone
git clone https://github.com/Shakir-Afridi/react-performify.git

# Create a feature branch
git checkout -b feature/my-new-hook

# Commit changes
git commit -m "feat: add useXYZ hook"

# Push & open PR
git push origin feature/my-new-hook

👨‍💻 Author

React Performify — maintained by passionate open-source developers who believe in clean, reusable React logic

⭐ Support

If you find this library useful, please give it a star ⭐ on GitHub — it helps others discover and support the project!

Keywords

  • react
  • hooks
  • react-hooks
  • custom-hooks
  • typescript
  • utility-hooks
  • ui-hooks
  • performance-hooks
  • frontend
  • react-library

Keywords

react

FAQs

Package last updated on 26 Oct 2025

Did you know?

Socket

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.

Install

Related posts