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

react-smee

v1.0.3

Published

![SMEE Logo](https://i.imgur.com/2aEuLug.png) ## _State Management: Extra Easy_

Readme

SMEE

SMEE Logo

State Management: Extra Easy

HOW TO USE SMEE v1.0

What is SMEE?

SMEE stands for State-management: Extra Easy, meaning the amount of work you have to do is reduced greatly in comparison to other state-management options. ​

Why use SMEE?

SMEE is an easy to use React hook to access, modify, and display your apps state in any component, on any level, globably. ​

Why Hooks?

Hooks are a bleeding-edge React feature allowing you to 'hook' into any component using the functions they provide, removing the need to prop drill down and allowing functional components to shine. They both simplify the amount of code needed to write and improve overall readability as a user entering the codebase.

SMEE uses hooks due to the ease of writing they provide and the removal of abstractions for you the user. With hooks like useState you are able to build custom hooks that do exactly what it says on the tin. ​

How to Get Started

First, download and install the package.

 npm install react-smee 

Now let's make a basic component that needs state. Say, a simple counter. ​

const Counter = () => {
  return <h1>Counter</h1>;
};

​ Now, in place of your useState hook, use SMEE's useStore hook. But hold on... It doesn't work EXACTLY like the useState hook... The syntax is a little different. The useStore hook allows for two inputs; the name of the state as a string, and the value of that state. If you include the value, it will assume you are attempting to alter the value, or add a new value if the input string does not exist as a piece of state in the global store. So, let's say we want to add a counter state that our counting component will alter. We would type the following: ​

const Counter = () => {
  const count = useStore('count', 0);
  return <h1>Counter: {count}</h1>;
};

​ Or, if we have the state defined elsewhere, we can use that same hook to grab it from the store. ​

const Counter = () => {
  const count = useStore('count', 0);
  return <h1>Counter: {count}</h1>;
};

​ Just like that, a global piece of state is added to the global store. Using it is just as simple. The useStore provided us with the value that was either created or pulled out from the global store. ​

Now we need to modify that value. Let's make a button that updates the counter using the setStore function. setStore takes a string representing the requested state, and a callback that determines what is done to that state. ​

const Counter = () => {
  const count = useStore('count', 0);
  return <h1>Counter: {count}</h1>;
};
const CounterUpdate = () => {
  return <button onClick={() => setStore('count', () => count + 1)} />;
};

​ Where you do this is up to you. Wanna do it right in your component? Go for it! Wanna do it on a separate page? Works just as well. Make a reducer page that will handle all the logic, pass it these values and alter them there. There is even a createStore function for generating initial state, making other developers working on your project have less headaches. createStore takes in an object containing all initial data for your project. Need to make multiple initial states? No problem. Use this function as often as you want, all data is pushed into the same global store. ​

createStore({
  count: 0,
});

​ And there you have it! Global state management has never been so easy.