See the same shopping cart built with SignalForge vs traditional state management. Which would YOU rather maintain?
No actions, reducers, or selectors. Just signals.
Totals update automatically. No useEffect needed.
No providers, no context. Works immediately.
// Global state - works everywhere
const cart = createSignal([]);
const total = createComputed(() =>
cart.get().reduce((s, i) =>
s + i.price * i.qty, 0)
);
// Use anywhere - no provider!
function Header() {
const t = useSignalValue(total);
return <div>Total: ${t}</div>;
}// Actions
const ADD = 'cart/add';
const UPDATE = 'cart/update';
// Reducer
function cartReducer(state, action) {
switch (action.type) {
case ADD: return [...state, action.payload];
case UPDATE: return state.map(/* ... */);
default: return state;
}
}
// Store
const store = createStore(cartReducer);
// Selectors
const selectTotal = state =>
state.cart.reduce(/* ... */);
// Provider wrapper
<Provider store={store}>
<App />
</Provider>
// Component
function Header() {
const total = useSelector(selectTotal);
return <div>Total: ${total}</div>;
}Both do the SAME thing. Notice how SignalForge automatically updates the total without useEffect!
0 items • $0.00
0 items • $0.00
Faster batch updates than individual setState calls
Total bundle size (gzipped) vs 40KB+ for Redux + middleware
Computed value recalculation (<0.01ms) - imperceptible to users
Problem with Redux: Every metric update triggers entire dashboard re-render. Need complex selectors and memoization.
SignalForge Solution: Each widget subscribes to its own signal. Only changed widgets update. Zero optimization needed.
Problem with Context API: Cart update causes entire product list to re-render. Slow and choppy.
SignalForge Solution: Cart badge updates independently. Product list unaffected. Butter smooth.
Problem with Zustand: Each keystroke triggers selector recalculation. Complex optimization required.
SignalForge Solution: Each paragraph is a signal. Only edited paragraph updates. Natural fit for real-time.