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

larry-state

v1.3.2

Published

This is global State management library by larry

Downloads

16

Readme

To install larry-state, follow these simple steps to add it to your React project:

Install via npm or yarn:

If you're using npm, run:

npm install larry-state

If you're using yarn, run:

yarn add larry-state

Reach out full Documentation.

What is larry-state?

larry-state is a lightweight and efficient global state management library tailored for React applications. It simplifies the process of managing application-wide state by providing both persistent and non-persistent options. Designed for small to medium-sized projects, it offers a straightforward alternative to more complex libraries like Redux, allowing developers to manage global state effortlessly while maintaining clean, readable code.

By leveraging React's native useContext and useReducer hooks, larry-state seamlessly integrates into existing React projects with minimal setup. Additionally, the library offers built-in state persistence using localStorage, enabling your app to retain data across browser sessions when necessary.

Why Choose larry-state?

  • Simple Setup: With no complex configuration, you can wrap your app in the GlobalStateProvider and start managing state right away.
  • Minimal Boilerplate: Skip the need for actions, reducers, and middleware. Use simple hooks to access and update global state.
  • Built-in Persistence: Easily persist global state with localStorage, ensuring your app remembers important values across browser sessions.
  • TypeScript Support: Fully typed, offering developers type-safe state management out of the box, reducing bugs and increasing maintainability.
  • Lightweight & Fast: Focused on performance, larry-state is ideal for small to medium-sized applications where simplicity and speed are priorities.

Key Features of larry-state:

  1. Global State Management: Manage shared state across your entire application without needing to pass props through multiple levels.
  2. Customizable Hooks: Take advantage of flexible hooks to update or reset state, including the ability to dynamically persist or reset values.
  3. Zero Middleware: No need for complex middleware setups—manage your application state with direct, intuitive functions.

How It Works:

At the core of larry-state is a provider component that wraps your application, making global state available anywhere in the component tree. Through the use of a custom hook, you can directly access and update state with minimal effort, allowing you to focus on building features instead of writing boilerplate code.

larry-state also simplifies persistence: by enabling state persistence with a single option, your application's critical data can be saved to localStorage, so it remains intact even after a page refresh or browser restart.

This combination of flexibility, simplicity, and performance makes larry-state an excellent choice for React developers looking for a lightweight yet powerful solution to global state management.

Reach out full Documentation.