signalforge
v1.0.2
Published
Fine-grained reactive state management with automatic dependency tracking - Ultra-optimized, zero dependencies
Maintainers
Readme
SignalForge

Fine-Grained Reactive State Management for Modern JavaScript
🚀 Quick Start • 🌐 Live Demo • 📖 Docs • 📱 Examples
🎯 What is SignalForge?
The simplest state management library for React and React Native.
Your UI automatically updates when data changes. Zero Redux complexity. Zero boilerplate.
💡 Think of it as Smart Variables
const count = createSignal(0); // ✨ Create a signal
count.set(5); // 🔄 Update it
count.get(); // 📖 Read it: 5
// 🧮 Computed values update automatically
const doubled = createComputed(() => count.get() * 2);
console.log(doubled.get()); // 10✨ Why Developers Love SignalForge
🎓 Easy to Learn
Only 3 core functions:
createSignal(value) // 📦 Store data
createComputed(() => ...) // 🧮 Auto-calculate
createEffect(() => ...) // ⚡ React to changes🌍 Works Everywhere
- ✅ React (hooks + classes)
- ✅ React Native (iOS + Android)
- ✅ Next.js (SSR ready)
- ✅ Plain JavaScript
🚀 Blazing Fast
- 🪶 2KB total bundle
- ⚡ 33x faster batched updates
- 📊 Handles 10,000+ signals
🔋 Batteries Included
- 💾 Auto-save to storage
- 🛠️ DevTools for debugging
- ⏱️ Time travel (undo/redo)
- 📦 Zero dependencies
🚀 Quick Start
Installation
npm install signalforgeYour First Signal
import { useSignal } from 'signalforge/react';
function Counter() {
const [count, setCount] = useSignal(0);
return (
<button onClick={() => setCount(count + 1)}>
🎉 Clicked {count} times
</button>
);
}That's it! 🎯 No providers, no context, no configuration needed.
🌟 Live Examples
Try It Right Now!
🌐 Web Demo
19 Interactive Demos
- 🔥 Compare with Redux/Zustand
- ⚡ Real-time performance metrics
- 📊 Side-by-side code examples
- 🎯 Shopping cart, forms & more
Note: Source code for web demos is not included in the repository. Try the live demo to see SignalForge in action!
📱 React Native Demo
19 Interactive Screens
- 🛒 Shopping cart with persistence
- 📝 Forms with validation
- 🔄 Cross-screen state sync
- 💾 AsyncStorage integration
📱 React Native Quick Run
git clone https://github.com/forgecommunity/signalforge.git
cd signalforge && npm install && npm run build
cd examples/sfReactNative && npm install && npm start
# In another terminal:
npm run android # or npm run ios📊 Performance Benchmarks
🏆 Built for Speed & Size
🪶 Tiny Bundle
2KB gzipped
0.5KB core only
0 dependencies
⚡ Lightning Fast
< 1ns signal reads
~10ns signal writes
33x faster batched updates
📈 Scales Up
10,000+ signals
< 100ns computed overhead
Minimal memory footprint
🥊 Head-to-Head Comparison
| Library | Bundle Size | Update Speed | Boilerplate | Learning Curve | |---------|-------------|--------------|-------------|----------------| | SignalForge 🏆 | 2KB | 33x faster ⚡ | 3 lines ✨ | 🟢 Easy | | Redux | 12.2KB | Baseline | 50+ lines | 🔴 Hard | | Zustand | 3.2KB | Similar | 10-15 lines | 🟡 Medium | | Recoil | 21KB | Slower | 20+ lines | 🔴 Hard | | MobX | 16KB | Fast | 15+ lines | 🟡 Medium |
🔬 Run Benchmarks Yourself
npm install
npm run benchmark
# 📁 Results saved to benchmarks/results/Try the live benchmark in our web demo to see the difference! 🎯
📚 Documentation
🎓 Learning Resources
💻 Example Projects
🤝 Get Help & Contribute
💬 Need Help?
🚀 Want to Contribute?
📄 License
MIT © ForgeCommunity
⭐ Star us on GitHub!
Built by ForgeCommunity
