I came to signals by way of Redux middleware. In an asset search, for example, the UI could dispatch a thunk. The middleware calls that function with dispatch and getState. The thunk can dispatch a request action before calling the search API, then a success or failure action when the request settles. That is the pattern the Juejin article illustrates with its fetchUser example. Each action gives the reducer a chance to update what the search panel displays.1
With redux-saga, the UI could dispatch a plain searchRequested action instead. A generator watching with takeLatest starts a search task for each new query and cancels the previous task if it is still running. That keeps an older search from dispatching results over a newer one.23
I was also familiar with redux-observable, where an epic transforms a stream of actions into another stream of actions. Across all three approaches I could trace how a result reached the reducer. What I wanted to understand about signals was the next step. Once a result changes, how does the UI know which component needs it?2
Who hears about a laptop checkout?
Imagine that a technician changes laptop A17 from available to checked out. Its row should change, as should the available count in the header. The model name on the next row should stay put. The interesting question is who records the relationship between those three pieces of UI and the edited value.
A reducer can handle the checkout whether the inventory lives in a React component or in Redux. It calculates the new inventory. How each row reads that inventory determines which rows receive the update.4 Dmitry Sky recommends Context for shared values that change infrequently, such as a theme, and Redux when complex update rules need to be predictable. Jotai lets components “subscribe to only the atoms they need.” Here, one atom per laptop would let A17’s row subscribe directly to its record.5
| Model | What the application writes | How a reader names its dependency |
|---|---|---|
| React Context | Replace the inventory array and pass it as the value of AssetsContext. | Every row reading that Context receives the new array, including the next row, even though its model name stayed the same. |
| Redux with React Redux | Dispatch an action. A reducer returns the new state. | A selector picks the value a component displays. A17’s status changes. The next row’s model name still compares equal, so that reader skips the update.2 |
| Zustand | Call a store action that updates the asset. | A component selects a slice, such as the status for A17. Returning a fresh collection can defeat an otherwise narrow selection. |
| Jotai | Write the asset's atom. A derived atom can calculate the available count. | A React component using useAtomValue subscribes to the atom’s value. Splitting by asset changes how much state a single write invalidates. |
| Valtio | Assign to a property of a proxy. | A React component reads a snapshot. The properties it accesses narrow the updates it observes. |
| Signals, as in Preact's signals core | Set the source signal. A computed value can derive the count. | Reading a signal in a tracked computation establishes a dependency. A later read can use a cached result until an input changes. |
These choices still leave a data-modeling decision to me. If I put every asset in a single array atom and replace the array, computations depending on that atom must reconsider their inputs. If I create a source per asset, a row can depend on just its own source. A total that genuinely depends on every status still has work to do. Narrow dependencies help most when the change itself is narrow.67
How I got from stores to atoms and proxies
Around the time I was working on React Flow, I looked up Zustand and compared it with Redux. I can date that reading to January 2, 2025. On April 4 I opened a multi-library comparison and a Jotai article. On April 16 I searched for Jotai by name and opened its official website.8 On July 2 I returned to comparisons of the state libraries. I remember following Daishi Kato's X profile and blog because the same developer kept turning up around three surprisingly different APIs. The third library I had forgotten was Valtio. Kato points out that he “wasn’t the original author of Zustand” in his account of how he joined the project.9
For a small or medium-sized app with straightforward shared state, I like how little ceremony Zustand asks of the first feature. My preference shifts when many independently changing values feed different parts of a large screen. An atom or signal gives me a small unit I can name, derive from, test, and compose. Redux retains a different advantage: when I need to explain why A17 changed, an explicit action and a predictable reducer make the history easier to follow. I can often fix an effect or a transition in one place.2
When a query count changes, what runs again?
Jotai’s atom model was inspired by Recoil. An atom gives a piece of state its own identity, so a component can subscribe to it and other atoms can derive values from it. That explains why atoms reminded me of signals. Both a Jotai derived atom and a Solid memo track the inputs they read.1011
On June 13 I opened a discussion in which dev-one asked, “But isn’t Jotai essentially just signals in React?”12 One reason to prefer Jotai came from StoryArcIV, the creator of Zedux. In a derived atom, get(queriesAtom) shows the dependency at the call site. In a Solid memo, a helper can read queries() several synchronous calls deeper and the memo still tracks it. I can extract the helper without passing a special getter through each call, though I may have to open the helper to see what the memo depends on.13
Imagine a toolbar with an Import button and a count of parsed SQL queries. In Jotai, atom(get => get(queriesAtom).length) defines a derived count. In Solid, createMemo(() => queries().length) does the same job. Rename a query and the count stays at three, so neither count needs to notify its readers of a new value. Import a fourth query and the two toolbars update at different boundaries.11
| Where the toolbar reads the count | What runs when three becomes four |
|---|---|
React + Jotai: const n = useAtomValue(countAtom) in Toolbar | React calls Toolbar again. It updates the count text and can reuse the button’s DOM node. |
Solid: <span>{count()}</span> inside the toolbar’s JSX | The text binding reads the new count. The toolbar function can stay out of the update. |
On July 10, after my visit, ryan_solid added that “the way they typically are consumed makes all the difference.” A signal can pass through several components before a leaf reads it. In the toolbar example, that final read is what connects the count to the text on screen.14
On June 13 I opened the React entry point in the Preact Signals repository, then the core source. I wanted to understand what a signal did on its own before comparing how frameworks used it in JSX. The imports gave me a clue. The React package gets signal, computed, and effect from @preact/signals-core, and hooks such as useSignal from its React runtime. In core, the .value getter records a dependency when a tracked computation reads the signal. That explains how a derived query count can follow edits to the list. Whether a change to that count reruns the toolbar or updates a single text node depends on how the renderer tracks the read in JSX.15
A signal holds a value. What does an Observable represent?
Earlier that morning I had searched for “what is diff between signal and observable”. Consider a checkout scanner that emits the same asset ID twice. For an audit trail, both scans matter. An Observable can deliver both emissions in order to a subscriber. For a badge that displays the most recently scanned ID, the second scan may leave the display unchanged. A signal represents the current value well. A derived signal can format the badge and update its dependents when that value changes.716
A plain Observable need not have a current value available to a new subscriber. A BehaviorSubject deliberately adds one. Conversely, an effect watching a signal makes a poor event log: equal writes can be suppressed, and batched changes may expose only the final state to the effect. I would keep scanner events as events and derive the latest badge value from them. That also explains why familiarity with redux-observable led me to ask about signals without making the two interchangeable.167
When is it cheaper to wait for a read?
Suppose a SQL import produces 100 successive snapshots of the query list while its preview is closed. An RxJS pipeline that stays subscribed to snapshots$.pipe(map(buildPreview)) calls buildPreview 100 times. With the TC39 proposal’s lazy Signal.Computed, the writes can mark the preview stale. If nothing reads it until the panel opens, the first read builds one preview from the latest snapshot. Both versions can use the same pure function. The saving comes from skipping intermediate previews that nobody sees.1617
RxJS can do the same amount of preview work here. Keep the latest query list in a BehaviorSubject and subscribe to the mapped preview when the panel opens. The new subscriber immediately gets a preview of the current list. An audit log has a different requirement: it needs every import event, including the ones that happened while the panel was closed.16
Redux combines push and pull too. After the reducer handles a dispatch, the store notifies subscribers. A subscriber can then call getState() and select the value it needs.18 What I like about a computed signal is that I can write “the preview is a function of the current query list” once. With lazy evaluation, the reader determines when that function needs to run.
Why targeted notification appeals to me
The analogy that first occurred to me was a hardware interrupt. A closer software example is Linux epoll: an application registers interest in file descriptors, and the kernel maintains a list of descriptors that are ready. Both designs appeal to the same instinct I have about UI work. If the system has already recorded who cares about a change, it can avoid checking every possible consumer. In a UI the registration can even change as a conditional computation reads a different set of signals.197
When one node moves, what happens to its neighbor?
Suppose I drag node A across a workflow canvas. Its position changes on every pointer move. Node B sits still. Assume each node keeps its object identity until its own data changes, and consider only updates caused by that position write.
| How positions are shared | Work at the stationary node B |
|---|---|
| One Context provides the nodes array. Each card reads it. | Replacing the array delivers a new Context value to B. Looking up B by ID inside its card still involves rendering the consumer. |
One Redux store. Each card selects state.nodes.byId[id].position. | B's selector may run. Its result retains the same reference, so this dispatch alone skips rendering B. Dividing the root state into more slices keeps the same store subscription boundary. |
| Each node has an independent store, and B subscribes only to its own. | Dispatching to A's store sends B no notification. A line between two nodes needs subscriptions to both stores. |
| Each position is a signal. B reads its own position in a tracked computation. | Writing A's position leaves B alone. A line whose path reads A's position is a dependent and can update. |
All four designs can create nodes at runtime. With React Redux, mounting another card with a new id establishes its subscription using the same selector expression. A simple lookup fits inline in the card. A derived selector shared by the canvas and inspector can live alongside the feature's reducer.182
Reconnecting a line makes the trade-off clearer. Suppose its path computation reads the current endpoint IDs and then reads the position signal for each ID. When I reconnect the target from B to C, the next evaluation drops B and starts tracking C. Handwritten subscriptions to independent stores can give the same narrow notifications, provided the line also switches its subscription. Signals do that bookkeeping from the reads that actually occur.20
Original diagram. The endpoints are reactive inputs. The arrows show which node positions feed the path calculation after each evaluation.
Maintaining those relationships takes memory and work. An incidental read of the zoom signal inside a geometry helper can make zoom another input. Reading a position once outside the tracked calculation can leave the path using a stale snapshot. The choice of data structure matters too. If every path reads one signal holding the entire nodes array, replacing that array can invalidate every path. An obstacle-avoiding router that inspects every node may genuinely depend on all of them.20
For an editor I would measure selector evaluations, component commits and time spent routing or painting a frame separately. Skipping cheap ID lookups might make little difference when path drawing dominates. A controlled React Flow canvas that rebuilds its full nodes array still pays for that step. An occasional edit in a small panel gives me little reason to change a clear component API. The comparison describes expected work for one drag, without claiming a measured speedup. See what one Redux dispatch costs.
Can the final coordinates tell me why a node moved?
A drag, an undo and an automatic layout can all leave A at the same coordinates. An action such as nodeDragFinished records a distinction the coordinates alone cannot recover. Redux Toolkit connects a store to Redux DevTools by default, so a named action can be inspected alongside the resulting state. With Context and a reducer I can record the action where the editor dispatches it. With signals I can record the same event in the drag or layout command before it writes positions. Watching positions in an effect can miss intermediate writes in a batch. For undo history I would record the completed gesture once, even if the canvas painted dozens of positions along the way.217
An editor can therefore expose one JSX interface per instance and choose its update and history mechanisms internally. Route loading and per-request state introduce other constraints, which I explored in the Preact and Solid comparison.
References
Footnotes
-
打野赵怀真. (2024, January 2). redux的thunk作用是什么? 稀土掘金. “处理异步操作,”
fetchUserexample. ↩ -
Redux maintainers. (n.d.). Side effects approaches. Redux documentation. Middleware, thunks, sagas, and observables. React Redux maintainers. (n.d.). Hooks. Selector equality. ↩ ↩2 ↩3 ↩4 ↩5
-
Redux-Saga contributors. (n.d.). Using saga helpers. Redux-Saga documentation. Running concurrent tasks with
takeEveryand cancelling earlier tasks withtakeLatest. ↩ -
鲨叔. (2021, June 15). 【react】context VS redux. 稀土掘金. “三者之间有什么区别” and “各自适用的场景”. ↩
-
Sky, D. (2024, January 23). React Context vs Redux vs Jotai. Medium, “Jotai,” item 3. Fine-grained state management. ↩
-
Poimandres contributors. (n.d.). Zustand, Jotai, and Valtio. GitHub. Selecting slices, primitive and derived atoms, reading snapshots in React. ↩
-
Hagemeister, M., & Miller, J. (2022, September 6). Introducing Signals. Preact. Sources, computed values, and subscriptions. Preact contributors. (n.d.). Signals. Batching and reading signals. ↩ ↩2 ↩3 ↩4 ↩5
-
Jotai contributors. (n.d.). Jotai, primitive and flexible state management for React. Accessed April 16 and April 19, 2025, at the then-official Jotai website. ↩
-
Kato, D. (2024, July 14). How Zustand was born. Daishi Kato's blog, introduction, first paragraph. Author's account. ↩
-
Kato, D. (2024, August 9). How Jotai was born. Daishi Kato’s blog. Recoil’s influence on Jotai. ↩
-
Jotai contributors. (n.d.). Atom and useAtom. Jotai documentation. Tracking derived atoms, subscribing from React. Solid contributors. (n.d.). Memos. Solid Tutorial. Derived values and downstream updates. ↩ ↩2
-
dev-one. (2024, June 17). Why people dislike signals when they’re using Jotai? Reddit, r/reactjs, opening post, para. 2. Original question. ↩
-
StoryArcIV. (2024, June 18). Comment on atom and signal dependency graphs. Reddit, r/reactjs. See also StoryArcIV. (2025, February 21). Follow-up on synchronous reads inside a reactive context. ↩
-
ryan_solid. (2025, July 10). Comment on where reactive values are consumed. Reddit, r/reactjs, para. 1. ↩
-
Preact contributors. (2025, June 11). Signals (commit
5d3a42a). GitHub. React entry point imports and core signal implementation. ↩ -
RxJS contributors. (n.d.). Observable, map, and BehaviorSubject. RxJS. Observable executions, map operator, BehaviorSubject API. ↩ ↩2 ↩3 ↩4
-
TC39 Signals proposal contributors. (n.d.). JavaScript Signals standard proposal. GitHub. Core features, including lazy evaluation of computed signals. ↩
-
Redux maintainers. (n.d.). Store and Deriving data with selectors. Redux documentation. Store subscriptions, where to define selectors. ↩ ↩2
-
Linux man-pages project. (n.d.). epoll(7). Linux manual pages, Description. Interest and ready lists. ↩
-
Viide, J. (2022, September 24). Signal boosting. Preact. Tracking and pruning dependencies. ↩ ↩2
-
Redux Toolkit maintainers. (n.d.). configureStore. Redux Toolkit documentation. Redux DevTools integration. ↩