Socket
Socket
Sign inDemoInstall

lstate

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lstate - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "lstate",
"description": "A simple, super-efficient and small (just 1.2kb) global state for React/Typescript applications",
"version": "1.0.0",
"version": "1.0.1",
"private": false,

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -18,6 +18,6 @@ [![Node.js CI](https://github.com/teintinu/lstate/actions/workflows/test.yml/badge.svg)](https://github.com/teintinu/lstate/actions/workflows/test.yml)

import React from 'react';
import { createGlobalState, useGlobalState } from "./lstate";
import { createGlobalState, useGlobalState } from "lstate";
const sample = createGlobalState({
initial: {count: 1},
initial: {count: 0},
reducers: (setter) => ({

@@ -34,7 +34,8 @@ inc() {

<h1>Testing lstate</h1>
<h2>A simple, efficient and small (just 2kb) global state for React applications</h2>
<h2>A simple, super-efficient and small (just 1.2kb) global state for React/Typescript applications</h2>
<p>count: {count}</p>
<button onClick={state.inc}>+</button>
<button onClick={sample.inc}>+</button>
</div>
}
```
[Click here to see a running demo](https://codesandbox.io/s/gallant-wind-ksplp?file=/src/state.ts)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc