⚡ React Performify

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 — zero external dependencies
- ⚙️ TypeScript support — fully typed API
- 🧩 Composable — integrate easily into existing code
- 🔧 Framework agnostic — works with any React setup (Vite, CRA, Next.js, etc.)
📘 Storybook
Explore all hooks interactively on Storybook:
👉 Live Demo
📦 Installation
Once published to npm:
npm install react-performify
yarn add react-performify
If you’re developing locally and want to test it
npm link
npm link react-performify
🧠 Available Hooks
| useDebouncedEffect | Runs effect after delay |
| useLazyMemo | Lazily memoizes value |
| useMemoizedCallback | Memoizes callback to avoid recreation |
| usePerformanceMonitor | Monitors performance metrics |
| usePerformanceOverlay | Displays performance overlay |
| usePerformanceStats | Tracks render statistics |
| useRenderCount | Counts component renders |
| useStableObject | Keeps object reference stable |
| useThrottledCallback | Throttles callback execution |
| useVirtualList | Optimizes rendering large lists |
| useWhyDidYouRender | Logs prop changes between renders |
🧩 Example Usage
import React from "react";
import { useToggle } from "react-performify";
export const Example = () => {
const [isOpen, toggle] = useToggle(false);
return (
<div>
<button onClick={toggle}>
{isOpen ? "Hide" : "Show"} Details
</button>
{isOpen && <p>Here are the details...</p>}
</div>
);
};
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
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.
git clone https://github.com/Shakir-Afridi/react-performify.git
git checkout -b feature/my-new-hook
git commit -m "feat: add useXYZ hook"
git push origin feature/my-new-hook
👨💻 Author
React Hookstack — 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