state-jet 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
- package/dist/example/App.js +0 -12
- /package/dist/{src/crdt.js → crdt.js} +0 -0
- /package/dist/{src/derived.js → derived.js} +0 -0
- /package/dist/{src/devtools.js → devtools.js} +0 -0
- /package/dist/{src/encryption.js → encryption.js} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/middleware.js → middleware.js} +0 -0
- /package/dist/{src/optimistic.js → optimistic.js} +0 -0
- /package/dist/{src/persistence.js → persistence.js} +0 -0
- /package/dist/{src/store.js → store.js} +0 -0
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A zero-boilerplate, ultra-fast global state management library for React. No con
|
|
|
5
5
|
## 🚀 Why state-jet?
|
|
6
6
|
- ✅ **No Context, No Providers** – Works outside React, reducing unnecessary re-renders.
|
|
7
7
|
- ✅ **Automatic Re-Renders** – Only components using specific state values update.
|
|
8
|
-
- ✅ **Super Lightweight** – Ultra
|
|
8
|
+
- ✅ **Super Lightweight** – Ultra small!
|
|
9
9
|
- ✅ **SSR & Next.js Support** – Works on both client and server.
|
|
10
10
|
|
|
11
11
|
## 🛠 Installation
|
|
@@ -30,7 +30,7 @@ function Counter() {
|
|
|
30
30
|
|Feature|Redux|Recoil|MobX|Jotai|state-jet|
|
|
31
31
|
|:----|:----|:----|:----|:----|:----|
|
|
32
32
|
|Setup Required|✅ Yes|✅ Yes|⚠️ Yes|❌ No|❌ No|
|
|
33
|
-
|Bundle Size|🚀 Large|🚀 Medium|⚡ Small|⚡ Small|🔥 Ultra-Small
|
|
33
|
+
|Bundle Size|🚀 Large|🚀 Medium|⚡ Small|⚡ Small|🔥 Ultra-Small|
|
|
34
34
|
|Reactivity|⚠️ Reducers|✅ Atoms|✅ Proxy-Based|✅ Signals|✅ Signal-Like|
|
|
35
35
|
|Renders Only Affected|❌ No|✅ Yes|✅ Yes|✅ Yes|✅ Yes|
|
|
36
36
|
|Derived/Computed State|❌ No|✅ Yes|✅ Yes|✅ Yes|✅ Yes|
|
package/package.json
CHANGED
package/dist/example/App.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = App;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const index_1 = require("../src/index");
|
|
6
|
-
const middleware_1 = require("../src/middleware");
|
|
7
|
-
const counter = (0, index_1.useStateGlobal)("counter", 0, { middleware: [middleware_1.loggerMiddleware] });
|
|
8
|
-
function App() {
|
|
9
|
-
const { undo, redo } = counter;
|
|
10
|
-
const count = counter.useStore();
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => counter.set(count + 1), children: "+" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => counter.set(count - 1), children: "-" }), (0, jsx_runtime_1.jsx)("button", { onClick: undo, children: "Undo" }), (0, jsx_runtime_1.jsx)("button", { onClick: redo, children: "Redo" }), (0, jsx_runtime_1.jsxs)("p", { children: ["Count: ", count] })] }));
|
|
12
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|