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 🙏

© 2024 – Pkg Stats / Ryan Hefner

unstated7

v1.0.0

Published

Unstated7 is a small and lightweight library for React. Unstated7 provides you great features as Unstated, except Provider and Promise though.

Downloads

5

Readme

Unstated7

This is the same thing as that, it goes without saying.

Overview

Unstated7 is a small and lightweight library for React. Unstated7 provides you great features as Unstated, except Provider and Promise though.

Unstated:

If you're like me, you're sick of all the ceremony around state management in React. Something that fits in well with the React way of thinking, but doesn't command some crazy architecture and methodology.

Component state is nice! It makes sense and people pick it up quickly:
・・・
As a new React developer you might not know exactly how everything works, but you can get a general sense pretty quickly.

The only problem here is that we can't easily share this state with other components in our tree. Which is intentional! React components are designed to be very self-contained.

What would be great is if we could replicate the nice parts of React's component state API while sharing it across multiple components.

But how do we share values between components in React? Through "context".
・・・
This is already pretty great. Once you get a little bit used to React's way of thinking, it makes total sense and it's very predictable.

But can we build on this pattern to make something even nicer?
・・・
Well this is where Unstated comes in.

Installing

Unstated7 fully supports in-browser, NodeJS (, Electron) , Browserify... usage. If you are using Unstated7 in your browser, simply include the script:

Browser

<script src="unstated7.js"></script>

Or use CDN:

<script src="https://unpkg.com/unstated7@latest/unstated7.js"></script>

NodeJS, etc.

Copy unstated7.js your PC, or run the following:

npm install unstated7

Simply use the Unstated7 module as you would any other module:

var unstated7 = require("unstated7.js");

Usage

See attached sample HTML files. This samples make sense to you if you are a React and Unstated user.

Contribution

  1. Fork it
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create new Pull Request

License

MIT