state-jet 1.0.9 β†’ 1.0.11

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 CHANGED
@@ -2,12 +2,22 @@
2
2
 
3
3
  A zero-boilerplate, ultra-fast global state management library for React. No context, reducers, or providersβ€”just simple reactive state.
4
4
 
5
+ For more details, see [here](https://statejet.netlify.app).
6
+
5
7
  ## πŸš€ Why state-jet?
6
8
  - βœ… **No Context, No Providers** – Works outside React, reducing unnecessary re-renders.
7
9
  - βœ… **Automatic Re-Renders** – Only components using specific state values update.
8
10
  - βœ… **Super Lightweight** – Ultra small!
9
11
  - βœ… **SSR & Next.js Support** – Works on both client and server.
10
12
 
13
+ ## Documentation
14
+
15
+ Documentation: https://statejet.netlify.app/docs
16
+
17
+ Tutorials: https://statejet.netlify.app/docs/category/tutorial
18
+
19
+ API Reference: https://statejet.netlify.app/docs/category/api-reference
20
+
11
21
  ## πŸ›  Installation
12
22
  ```bash
13
23
  npm install state-jet
@@ -29,7 +39,7 @@ function Counter() {
29
39
 
30
40
  | Feature | Redux | Recoil | MobX | Jotai | Zustand | state-jet |
31
41
  | ------------------------ | ----------- | --------- | ------------- | --------- | ---------------------- | --------------------- |
32
- | Setup Required | βœ… Yes | βœ… Yes | ⚠️ Yes | ❌ No | ⚠️ Minimal | ❌ No |
42
+ | Easy Setup | ❌ No | ❌ No | ⚠️ No | ❌ No | ⚠️ Minimal | βœ… Ultra-Minimal |
33
43
  | Bundle Size | πŸš€ Large | πŸš€ Medium | ⚑ Small | ⚑ Small | ⚑ Small | πŸ”₯ Ultra-Small |
34
44
  | Reactivity | ⚠️ Reducers | βœ… Atoms | βœ… Proxy-Based | βœ… Signals | βœ… Proxy-Based | βœ… Signal-Like |
35
45
  | Renders Only Affected | ❌ No | βœ… Yes | βœ… Yes | βœ… Yes | βœ… Yes | βœ… Yes |
@@ -41,12 +51,59 @@ function Counter() {
41
51
 
42
52
  ## ⚑ Why state-jet Is More Advanced Than Zustand
43
53
 
44
- **No Proxies Needed** β†’ Zustand uses proxies for state updates, but state-jet uses signals, making it even faster.
45
- **Derived State Is Automatic** β†’ No need for selectors; state updates only trigger where necessary.
46
- **Optimistic Updates & Rollback** β†’ Unlike Zustand, state-jet has built-in support for instant UI updates and auto-revert on failures.
47
- **Multi-Tab Sync** β†’ WebSocket and IndexedDB syncing, so global state persists across browser tabs and devices.
48
- **CRDT Support** β†’ Automatic conflict resolution for real-time apps, something even Zustand lacks.
54
+ - **No Proxies Needed** β†’ Zustand uses proxies for state updates, but state-jet uses signals, making it even faster.
55
+ - **Derived State Is Automatic** β†’ No need for selectors; state updates only trigger where necessary.
56
+ - **Optimistic Updates & Rollback** β†’ Unlike Zustand, state-jet has built-in support for instant UI updates and auto-revert on failures.
57
+ - **Multi-Tab Sync** β†’ global state persists across browser tabs and devices.
58
+ - **CRDT Support** β†’ Automatic conflict resolution for real-time apps, something even Zustand lacks.
49
59
 
50
60
  βœ… Conclusion
51
61
 
52
- If you need the simplest, fastest, and most advanced state management solution for React, state-jet beats Redux, Recoil, MobX, Jotai, and even Zustand in performance, reactivity, and developer experience. πŸš€
62
+ If you need the simplest, fastest, and most advanced state management solution for React, state-jet beats Redux, Recoil, MobX, Jotai, and even Zustand in performance, reactivity, and developer experience. πŸš€
63
+
64
+ ## 🎯 Why Use `optimisticUpdate`?
65
+ | Feature | Without `optimisticUpdate` | With `optimisticUpdate` |
66
+ | ----------------------- | -------------------------- | --------------------------- |
67
+ | **UI Responsiveness** | Delayed (Waits for API) | Instant update (Optimistic) |
68
+ | **User Experience** | Slow & Janky | Fast & Smooth |
69
+ | **Rollback on Failure** | Manual Handling | Automatic |
70
+ | **Code Complexity** | High | Low |
71
+
72
+
73
+ ## 🎯 Why Use `syncCRDT`?
74
+ | Feature | Without `syncCRDT` | With `syncCRDT` |
75
+ | ---------------------- | ------------------ | ------------------------- |
76
+ | **Multi-User Sync** | Possible Conflicts | βœ… Automatic Merging |
77
+ | **Real-Time Updates** | Needs Manual Fixes | βœ… No Data Loss |
78
+ | **Handles Conflicts** | Can Lose Changes | βœ… Merges Automatically |
79
+ | **Scalable for Teams** | Hard to Maintain | βœ… Ideal for Collaboration |
80
+
81
+
82
+ ## 🎯 Why Use `derivedState`?
83
+
84
+ | Feature | Without `derivedState` | With `derivedState` |
85
+ | ------------------------- | -------------------------- | ----------------------------- |
86
+ | **Manual Recalculations** | ❌ Yes (Recompute manually) | βœ… Automatic |
87
+ | **Reactivity** | ❌ Requires `useEffect` | βœ… Updates only when needed |
88
+ | **Performance** | ❌ Unoptimized | βœ… Only recalculates on change |
89
+ | **Code Complexity** | ❌ High | βœ… Minimal |
90
+
91
+ ## 🎯 Why Use undo & redo?
92
+
93
+ | Feature | Without Undo/Redo | With Undo/Redo |
94
+ | ---------------------- | ----------------------- | ------------------------- |
95
+ | **Accidental Changes** | ❌ Lost forever | βœ… Easily undone |
96
+ | **User Experience** | ❌ Frustrating | βœ… Smooth & intuitive |
97
+ | **Multi-Step Editing** | ❌ Hard to track | βœ… Easy to restore history |
98
+ | **Performance** | ❌ Needs manual tracking | βœ… Automatic |
99
+
100
+
101
+ ## Contributing
102
+
103
+ Development of State-jet happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving State-jet.
104
+
105
+ - [Contributing Guide](./CONTRIBUTING.md)
106
+
107
+ ### License
108
+
109
+ State-jet is [MIT licensed](./LICENSE).