npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scrova

v1.0.4

Published

Next-Gen State Management for React (Fast, Simple, Zero Boilerplate)

Readme

Scrova 🚀

🔥 Scrova - The Next-Gen State Management Library for React

📌 Fast, Simple, Zero Boilerplate, and High-Performance State Management

🚀 Features

Zero Boilerplate – Easier than Redux Toolkit
Global & Local State Management – Best combo of Zustand and Redux
Auto Reducers & Actions – Automatically handles reducers
Optimized Performance – No unnecessary re-renders
Works Inside & Outside React Components
Middleware & Async Handling Support

📌 Installation

npm install scrova

or

yarn add scrova

📌 Quick Example

import { useScrova, actions } from "scrova";

function Counter() {
  const [count, setCount] = useScrova("counter");

  return (
    <div>
      <h2>Counter: {count}</h2>
      <button onClick={() => setCount(actions.counter.increment())}>+1</button>
    </div>
  );
}

📌 Full Usage Guide

✅ Step 1: Setup Global Store (Optional)

If you need a Global Store, define it here.

If only Local State is required, you can skip this step.

import { configureScrova } from "scrova";

// 🟢 Setup Global Store with Reducers
export const { useScrova, actions } = configureScrova({
  counter: {
    state: 0,
    reducers: {
      increment: (state) => state + 1,
      decrement: (state) => state - 1,
      incrementByAmount: (state, payload) => state + payload,
    },
  },
  user: {
    state: { name: "Guest", email: "" },
    reducers: {
      updateUser: (state, payload) => ({ ...state, ...payload }),
    },
  },
  theme: {
    state: "light",
    reducers: {
      toggleTheme: (state) => (state === "light" ? "dark" : "light"),
    },
  },
});

Now store is ready

✅ Step 2: Using Scrova in Components

🔹 Example 1: Counter with Global State

import { useScrova, actions } from "./store";

function Counter() {
  const [count, setCount] = useScrova("counter");

  return (
    <div>
      <h2>Counter: {count}</h2>
      <button onClick={() => setCount(actions.counter.increment())}>+1</button>
      <button onClick={() => setCount(actions.counter.decrement())}>-1</button>
      <button onClick={() => setCount(actions.counter.incrementByAmount(5))}>+5</button>
    </div>
  );
}

✔ Now it's as simple as Zustand + Redux Toolkit! 🚀

🔹 Example 2: User Profile with Reducers

import { useScrova, actions } from "./store";

function UserProfile() {
  const [user, setUser] = useScrova("user");

  return (
    <div>
      <h2>Welcome, {user.name}</h2>
      <button onClick={() => setUser(actions.user.updateUser({ name: "John Doe" }))}>
        Change Name
      </button>
    </div>
  );
}

✔ Now the User Profile will stay in sync across the entire app! 🎯

🔹 Example 3: Theme Toggle

import { useScrova, actions } from "./store";

function ThemeToggle() {
  const [theme, setTheme] = useScrova("theme");

  return (
    <button onClick={() => setTheme(actions.theme.toggleTheme())}>
      Toggle Theme ({theme})
    </button>
  );
}

✔ Now the Theme will be controlled from a single state across the entire app! 🎯

✅ Step 3: Using Scrova for Local State (Like useState)

If you only need Local State, you can use useScrova() without configureScrova()!

import { useScrova } from "scrova";

function LocalCounter() {
  const [count, setCount] = useScrova(null, 0); // 🔥 Local State Mode

  return (
    <div>
      <h2>Local Counter: {count}</h2>
      <button onClick={() => setCount(count + 1)}>+1</button>
    </div>
  );
}

✔ Now you’ll get Zustand-like simple behavior, without any extra setup!

✅ Step 4: Using Scrova Outside React (For APIs, Event Listeners)

Now you can use Scrova for Event Listeners and API Calls as well!

import { getScrovaState, setScrovaState } from "scrova";

// 🔹 Event Listener से State Access करना
document.addEventListener("keydown", (event) => {
  const theme = getScrovaState("theme");
  console.log(`Current Theme: ${theme}`);
});

// 🔹 API Call में State Set करना
async function fetchUserData() {
  const res = await fetch("https://jsonplaceholder.typicode.com/users/1");
  const data = await res.json();
  setScrovaState("user", data);
}

✔ Now Scrova is not just limited to React—it will also work with APIs and Events! 🚀

📌 Performance Optimization

Scrova is optimized for High Performance:

✔ No Unnecessary Renders
✔ Memory Efficient
✔ Optimized for Large-Scale Apps

📌 Comparison: Redux Toolkit vs Zustand vs Scrova

| Feature | Redux Toolkit | Zustand | Scrova 🚀 | |---------------------------------|--------------|---------|-----------------| | Global State? | ✅ Yes | ✅ Yes | ✅ Yes | | Local State? | ❌ No | ✅ Yes | ✅ Yes | | Slice-Based Structure? | ✅ Yes | ❌ No | ✅ Yes (Auto) | | Boilerplate Required? | ❌ Too Much | ✅ Minimal | ✅ Super Minimal | | Reducer Functions Auto Generated? | ❌ No | ❌ No | ✅ Yes | | Middleware Support? | ✅ Yes | ✅ Yes | ✅ Yes | | Async Handling? | ✅ Yes (Thunk) | ❌ No | ✅ Yes (Built-in) | | Works Outside React? | ❌ No | ❌ No | ✅ Yes | | Unnecessary Renders Removed? | ❌ No | ❌ No | ✅ Yes | | Reactivity Speed | 🚀 Fast | ⚡ Medium | ⚡⚡ Super Fast | | Memory Usage | 🔴 High | 🟡 Medium | 🟢 Low | | Instant State Updates? | ❌ No | ✅ Yes | ✅ Yes (Super Fast) | | Enterprise-Level Performance? | ❌ No | ❌ No | ✅ Yes |

📌 Final Thoughts

🔥 Scrova is the best combo of Zustand + Redux Toolkit!

Global + Local State in One Hook
Zero Boilerplate
Works Inside & Outside React
High Performance & Optimized
Enterprise-Level State Management

📌 Contributors

🎯 Maintainer: Rohit Patel 🔗 GitHub Repo: Scrova on GitHub

📢 Pull Requests & Issues Welcome! 🚀

🚀 Ready to Use Scrova?

npm install scrova

🔥 Now Build Faster & Smarter with Scrova! 🚀