<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SDuX Vault on Medium]]></title>
        <description><![CDATA[Stories by SDuX Vault on Medium]]></description>
        <link>https://medium.com/@sduxvault?source=rss-338b38a89c38------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fv9PNT6CATYKgkpf</url>
            <title>Stories by SDuX Vault on Medium</title>
            <link>https://medium.com/@sduxvault?source=rss-338b38a89c38------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:18:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sduxvault/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A New Angular Tutorial for Building a Complete Feature with SDuX]]></title>
            <link>https://medium.com/@sduxvault/a-new-angular-tutorial-for-building-a-complete-feature-with-sdux-9e382168ef63?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e382168ef63</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 10 Sep 2026 22:27:19 GMT</pubDate>
            <atom:updated>2026-09-10T22:27:19.848Z</atom:updated>
            <content:encoded><![CDATA[<p>The new Angular tutorial at <a href="https://www.sdux-vault.com/tutorial/angular">https://www.sdux-vault.com/tutorial/angular</a> for SDuX Vault is built around a complete feature, not a pile of disconnected API samples. You start with an empty Angular project and finish with a typed FeatureCell, a service-owned feature boundary, and a character workflow that can read, create, update, delete, filter, sort, and derive display-ready State.</p><p>That shape matters because state management becomes difficult at the boundaries between UI code, domain ownership, asynchronous inputs, and operational policy. The tutorial makes those boundaries visible while you build. Each chapter leaves you with a working checkpoint, a live StackBlitz project, and a clear reason to adopt — or skip — the next capability.</p><p>Key takeaway: The tutorial teaches a repeatable feature structure. Angular UI events call a feature service; the service owns its FeatureCell; the pipeline resolves and shapes a candidate; and the component reads the committed StateSnapshot.</p><p>Why This Tutorial Was Released</p><p>A typical quick-start example can show a successful state update in a few lines. It cannot show where the feature should live once the application needs selection, editing, validation, loading, error handling, persistence, or testing. Developers then fill in the missing architecture from memory, and the state boundary slowly moves into whichever component was edited last.</p><p>This Angular tutorial takes the opposite route. It keeps one feature in view while the requirements grow. The application is a Star Wars character registry, but the teaching target is the boundary: the service owns Feature State and FeatureCell access, while the component owns local presentation concerns and user interaction.</p><p>You do not need previous SDuX experience. The opening chapter explains the setup, the mental model, the expected environment, and the recommended path through the material. It also makes an important distinction early: the complete example demonstrates many capabilities, but a production feature should adopt the smallest set that matches its actual requirements.</p><p>From Project Setup to a Working Feature</p><p>The core path starts with the application boundary and ends with a useful read-and-write workflow. You define the Feature State, register the FeatureCell, connect it to an Angular service, and keep the component focused on rendering and interaction. The character workflow then grows in deliberate steps.</p><p>Display a character: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-2">https://www.sdux-vault.com/tutorial/angular/chapter-2</a><br>Establish a service-owned FeatureCell and expose committed State to the UI.</p><p>Display characters: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-3">https://www.sdux-vault.com/tutorial/angular/chapter-3</a><br>Add selection without moving the collection or its ownership into the component.</p><p>Add/Edit characters: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-4">https://www.sdux-vault.com/tutorial/angular/chapter-4</a><br>Use withArrayAppendMergeBehavior to append a new character or update an existing character while keeping collection updates inside the service-owned boundary.</p><p>Delete characters: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-5">https://www.sdux-vault.com/tutorial/angular/chapter-5</a><br>Use withArrayByIdMergeBehavior to remove, add, and edit a character by identifier inside the service-owned boundary.</p><p>Lifecycle: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-6">https://www.sdux-vault.com/tutorial/angular/chapter-6</a><br>Distinguish a persisted null value, a reusable reset, and permanent FeatureCell destruction.</p><p>Filters and reducers: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-7">https://www.sdux-vault.com/tutorial/angular/chapter-7</a><br>Centralize filtering, sorting, labels, and display derivation before the UI renders State.</p><p>The result is more useful than a finished screen. You can see why each responsibility belongs where it does, and you can carry that structure into a different feature instead of copying a component that happens to work for one demo.</p><p>The Feature Service Is the Teaching Boundary</p><p>The tutorial repeatedly returns to one rule: the component should not become the owner of Feature State just because it is the place where State is displayed. The service exposes the component-facing reactive State, while the service also owns the FeatureCell configuration and update methods.</p><p>The welcome chapter summarizes the flow like this: Angular UI action, feature service method, FeatureCell request, FeatureCell pipeline execution, committed StateSnapshot, component Signal or Observable, and finally the template. That sequence gives every later chapter a stable place to add behavior without changing the basic ownership model.</p><p>Angular application setup</p><p>import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection } from ‘<a href="http://twitter.com/angular/core">@angular/core</a>’;<br>import { provideVault } from ‘<a href="http://twitter.com/sdux">@sdux</a>-vault/angular’;</p><p>export const appConfig: ApplicationConfig = {<br> providers: [provideBrowserGlobalErrorListeners(), provideZonelessChangeDetection(), provideVault()]<br>};</p><p>This is the tutorial’s initial application configuration. Later checkpoints add the FeatureCell provider and the service-owned feature contract without changing the application runtime setup. The code is small; the important lesson is where the setup lives and how it prepares the application boundary for the feature.</p><p>Warning: Do not treat every value the UI needs as Feature State. The tutorial keeps selection, form mode, confirmation, and feedback local when they are presentation concerns. Shared domain State stays with the feature service.</p><p>Core Chapters First, Optional Labs Second</p><p>Chapters 1–7 form the main read, write, lifecycle, transformation, and error-management path. Chapters 8–15 then act as focused labs for requirements that will not belong in every application. That organization helps you learn the complete feature without turning every available capability into a mandatory checklist.</p><p>Errors: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-8">https://www.sdux-vault.com/tutorial/angular/chapter-8</a><br>Failure observation and error handling at the feature boundary.</p><p>Async input: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-9">https://www.sdux-vault.com/tutorial/angular/chapter-9</a><br>Promise, Observable, and Angular HTTP Resource inputs through the same feature boundary.</p><p>Delay: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-10">https://www.sdux-vault.com/tutorial/angular/chapter-10</a><br>Timing policy for delayed state transitions when that requirement fits the application.</p><p>Encrypt and Persist: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-11">https://www.sdux-vault.com/tutorial/angular/chapter-11</a><br>Encrypted, tab-scoped session persistence when that requirement fits the application.</p><p>State introspection: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-12">https://www.sdux-vault.com/tutorial/angular/chapter-12</a><br>Observation points for explaining a transition without giving diagnostics authority over State.</p><p>Tab Sync: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-13">https://www.sdux-vault.com/tutorial/angular/chapter-13</a><br>Same-origin coordination across browser tabs.</p><p>Distinct Until Changed: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-14">https://www.sdux-vault.com/tutorial/angular/chapter-14</a><br>Deliberate suppression of semantically redundant candidates.</p><p>Stepwise: <a href="https://www.sdux-vault.com/tutorial/angular/chapter-15">https://www.sdux-vault.com/tutorial/angular/chapter-15</a><br>Explicit human or policy decisions at a pipeline boundary, treated as a comparison lab rather than a default.</p><p>Each lab explains its boundary and its trade-offs. For example, Tab Sync coordinates finalized Feature State across same-origin browser tabs; it does not turn every form interaction into shared collaboration. Encrypted persistence protects values at the persistence boundary, but the tutorial still asks you to consider whether the data and threat model justify storing it locally.</p><p>Checkpoints Make the Tutorial Recoverable</p><p>Long tutorials fail when one missed import or one divergent file leaves the reader guessing what changed. This tutorial addresses that problem with chapter checkpoints. You can continue in one Angular project, or start a later chapter from the completed source of the preceding chapter.</p><p>Each chapter also provides a live StackBlitz project and a downloadable archive. Use the complete-file tabs to compare your checkpoint, inspect the action list to see what is new, and run the finished example when your local project has drifted. The result is a practical feedback loop: build, compare, understand, and then continue.</p><p>Open the StackBlitz project: <a href="https://www.sdux-vault.dev/stackblitz">https://www.sdux-vault.dev/stackblitz</a></p><p>Key takeaway: Choose your route. Start at the beginning if you want the ownership model built from first principles. Start from a checkpoint when you already understand the core path and need to investigate one optional capability.</p><p>Deeper Dive</p><p>Open the Angular tutorial: <a href="https://www.sdux-vault.com/tutorial/angular">https://www.sdux-vault.com/tutorial/angular</a></p><p>Build the feature step by step. Use the chapter labs to test a specific requirement, but keep the central boundary in view: the component renders and interacts, the feature service owns State, and the FeatureCell pipeline keeps the transition path explicit.</p><p>If you are evaluating SDuX Vault for an existing Angular application, the tutorial is also a useful architecture review. Compare its service boundary with your current feature, identify which concerns are mixed into the UI, and adopt only the chapters that address a real need.</p><p>Watch It</p><p>Pipeline Overview: <a href="https://www.youtube.com/watch?v=m7ClyWSh754">https://www.youtube.com/watch?v=m7ClyWSh754</a></p><p>SDUX vs Redux O(n) Comparison: <a href="https://www.youtube.com/watch?v=aFTiIvR0H4M">https://www.youtube.com/watch?v=aFTiIvR0H4M</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e382168ef63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Svelte Reactivity Without Manual State Subscriptions]]></title>
            <link>https://medium.com/@sduxvault/svelte-reactivity-without-manual-state-subscriptions-084604cc9b1c?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/084604cc9b1c</guid>
            <category><![CDATA[svelte]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 00:29:12 GMT</pubDate>
            <atom:updated>2026-08-21T00:29:12.103Z</atom:updated>
            <content:encoded><![CDATA[<h3>Svelte Reactivity Without a Second State Subscription</h3><figure><img alt="SDuX Vault stacked logo for a technical article about Svelte state management. This post explains how the @sdux-vault/svelte wrapper preserves the FeatureCell State Snapshot while connecting the state getter to Svelte 5 reactivity, helping Svelte developers avoid duplicate state subscriptions, missed initial State, and manual cleanup code." src="https://cdn-images-1.medium.com/max/1024/1*BGGtTAiyPi5fcj2zlvV7UQ.jpeg" /></figure><p>Svelte state integration should not require a second subscription in every component. SDuX Vault™ keeps the core FeatureCell™ contract intact while `<a href="http://twitter.com/sdux">@sdux</a>-vault/svelte` makes the existing **State Snapshot** reactive through Svelte 5 effects.</p><p>The result is a Svelte-native read model: create the [FeatureCell](<a href="https://www.sdux-vault.com/docs/references/functions/feature-cell">https://www.sdux-vault.com/docs/references/functions/feature-cell</a>) once, read **state** through **$derived**, and render the current Snapshot. The wrapper connects that read to the Svelte effect lifecycle without asking the component to manage a separate **state$** subscription and cleanup path.</p><p>&gt; **Key takeaway:** The Svelte integration preserves synchronous Snapshot access while making reads of the existing `state` getter reactive inside Svelte.</p><p>## Why Svelte Needs an Integration Wrapper</p><p>The core [FeatureCell](<a href="https://www.sdux-vault.com/docs/references/functions/feature-cell">https://www.sdux-vault.com/docs/references/functions/feature-cell</a>) already exposes a FluentApi, a synchronous State Snapshot, and a State Stream. Svelte adds its own reactive effect model, so the integration challenge is not replacing the core state contract. It is connecting an existing state read to the lifecycle that Svelte understands.</p><p>`<a href="http://twitter.com/sdux">@sdux</a>-vault/svelte` is that integration wrapper. The [SvelteFeatureCellAdapter](<a href="https://www.sdux-vault.com/docs/references/classes/svelte-feature-cell-adapter">https://www.sdux-vault.com/docs/references/classes/svelte-feature-cell-adapter</a>) receives the core FeatureCell, preserves its original State getter, and returns the same cell with a Svelte-aware State getter. Your Svelte component still reads a Snapshot; the wrapper supplies the reactive connection behind that read.</p><p>&gt; **Warning:** `<a href="http://twitter.com/sdux">@sdux</a>-vault/svelte` requires Svelte 5.7 or a later Svelte 5 release because its reactive State getter uses `createSubscriber()`.</p><p>## Install the Svelte Integration</p><p>The Svelte package is available separately from the core APIs. You can use the core APIs in a Svelte application without the package, but the Svelte-reactive **state** getter is supplied by `<a href="http://twitter.com/sdux">@sdux</a>-vault/svelte`.</p><p>```typescript<br>npm install <a href="http://twitter.com/sdux">@sdux</a>-vault/svelte<br>```</p><p>## Create the FeatureCell Outside the Component</p><p>Create and initialize the FeatureCell in a stable module, then import that reference into the Svelte component. This keeps cell creation separate from component rendering while allowing the component to read the same reactive Snapshot.</p><p>```typescript<br>import { FeatureCell, Vault } from ‘<a href="http://twitter.com/sdux">@sdux</a>-vault/svelte’;</p><p>Vault({<br> logLevel: ‘off’,<br> devMode: false<br>});</p><p>export const counterCell = FeatureCell&lt;number&gt;({<br> key: ‘counter’,<br> initialState: 0<br>});</p><p>counterCell.initialize();<br>```</p><p>## Read the Snapshot Through $derived</p><p>In the Svelte component, derive a local reference from `counterCell.state`. The adapter tracks the reactive read, returns the current synchronous Snapshot, and lets Svelte reevaluate the derived value when State changes.</p><p>```svelte<br>&lt;script lang=”ts”&gt;<br>import { counterCell } from ‘./counter.cell’;</p><p>let snapshot = $derived(counterCell.state);<br>&lt;/script&gt;</p><p>{#if snapshot.isLoading}<br> &lt;p&gt;Loading…&lt;/p&gt;<br>{:else if snapshot.error}<br> &lt;p role=”alert”&gt;{snapshot.error.message}&lt;/p&gt;<br>{:else if !snapshot.hasValue}<br> &lt;p&gt;No State is available.&lt;/p&gt;<br>{:else}<br> &lt;p&gt;Count: {snapshot.value}&lt;/p&gt;<br>{/if}<br>```</p><p>The Snapshot exposes **value**, **hasValue**, **isLoading**, and **error**. The template can render those fields directly without maintaining a second local subscription state.</p><p>| Field | Use in a Svelte component |<br>| — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| `value` | Render the current State value. |<br>| `hasValue` | Determine whether State is available to render. |<br>| `isLoading` | Display a loading state while State is being resolved. |<br>| `error` | Render an accessible error message when State fails. |</p><p>## Why a Manual state$ Subscription Can Miss Initial State</p><p>A manual `state$` subscription created after the [FeatureCell](<a href="https://www.sdux-vault.com/docs/references/functions/feature-cell">https://www.sdux-vault.com/docs/references/functions/feature-cell</a>) initializes can miss the emission that committed the initial State. Later State updates may still reach that subscription, but the component can begin without the current Snapshot.</p><p>Reading `state` inside Svelte reactivity gives the component the current Snapshot during its evaluation and connects that read to subsequent State changes through the same effect lifecycle. Outside Svelte reactivity, use `state` for the latest synchronous Snapshot or use `state$` when an explicitly managed Observable subscription is required.</p><p>Try the [Svelte StackBlitz examples](<a href="https://www.sdux-vault.com/stackblitz">https://www.sdux-vault.com/stackblitz</a>) to see the integration in a live project.</p><p>## Deeper Dive</p><p>Read the [Svelte integration documentation](<a href="https://www.sdux-vault.com/docs/pipeline/api/svelte">https://www.sdux-vault.com/docs/pipeline/api/svelte</a>) and the [FeatureCell State property documentation](<a href="https://www.sdux-vault.com/docs/pipeline/apis/feature-cell-api/state-property">https://www.sdux-vault.com/docs/pipeline/apis/feature-cell-api/state-property</a>) for the complete Svelte usage pattern.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=084604cc9b1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[State Management in Vue Without a Store]]></title>
            <link>https://medium.com/@sduxvault/state-management-in-vue-without-a-store-25ca46a38060?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/25ca46a38060</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[state-management]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 23:27:52 GMT</pubDate>
            <atom:updated>2026-07-16T23:27:52.520Z</atom:updated>
            <content:encoded><![CDATA[<p># State Management in Vue Without a Store</p><p>Reaching for Pinia or Vuex the moment two Vue components need to share state has become reflex. But cross-component state does not actually require a global store. SDuX Vault™ runs the same deterministic pipeline in Vue through a universal core API — `<a href="http://twitter.com/sdux">@sdux</a>-vault/core` paired with the thin `<a href="http://twitter.com/sdux">@sdux</a>-vault/vue` reactive surface. No adapter ceremony, no Provider tree, no store singleton. You own scoped, reactive, atomically-committed state in a few lines that plug straight into Vue’s composition API.</p><p>&gt; **Key takeaway:** Installing `<a href="http://twitter.com/sdux">@sdux</a>-vault/vue` is all you need. It pulls in `<a href="http://twitter.com/sdux">@sdux</a>-vault/core` as a dependency, so the full runtime and API surface come with it — one install, nothing else to wire up.</p><p>```bash<br>npm install <a href="http://twitter.com/sdux">@sdux</a>-vault/vue<br>```</p><p>## The Vue State Question Beyond Pinia</p><p>A global store solves a real problem: two components that are not parent and child still need to agree on the same data. Pinia and Vuex answer that by hoisting the data into an application-wide container that every component can reach.</p><p>That answer comes with **costs you inherit** whether you want them or not. The store is a shared dependency: every slice lives in one reactive object, unrelated features are coupled through the same container, and testing a single piece of state means standing up the whole store. As the app grows, the store becomes the place every feature has to negotiate with.</p><p>The questions worth asking are narrower than “which store?”</p><p>&gt; _Which components actually need to share this state?_<br>&gt;<br>&gt; _Can that ownership live with the feature instead of in a global tree?_</p><p>**SDuX Vault** answers by giving each domain concern its own isolated **FeatureCell™** — a self-contained unit of state you import where you need it, with no central container in the middle.</p><p>## One Universal Core API in Vue</p><p>SDuX Vault is built on a **Plain TypeScript, Zero Magic** core. Every concept — FeatureCells, pipelines, reducers, filters, immutable state snapshots — is a language-level primitive, not a framework abstraction. The payoff for you is direct: `Vault()` and `FeatureCell()` are the same battle-tested core running inside your Vue app — no Vue-specific reimplementation, no behavior that only exists here.</p><p>Vue integration is delivered as a thin wrapper, `<a href="http://twitter.com/sdux">@sdux</a>-vault/vue`, that preserves the core FeatureCell contract and adds one Vue-native addition: `useReactiveState()`. That single composable connects a FeatureCell’s committed state to Vue’s effect scope, so your component re-renders reactively with no manual subscription and no cleanup code.</p><p>&gt; **Key takeaway:** There is no Provider and no store instance to register at the root. You create a FeatureCell once as a module-level constant and import its stable reference wherever you need it — the same way you would import any other module.</p><p>## Creating a FeatureCell with Vault and FeatureCell</p><p>Two calls set up ownership. Initialize the Vault runtime once, then register a FeatureCell with a unique key and its initial state. Registration binds identity and configuration; it does not run the pipeline. Calling `initialize()` prepares the cell for state updates. Create and initialize the cell _outside_ the component so its reference stays stable across renders.</p><p>```typescript<br>import { FeatureCell, Vault } from ‘<a href="http://twitter.com/sdux">@sdux</a>-vault/vue’;</p><p>Vault({<br> logLevel: ‘off’,<br> devMode: false<br>});</p><p>export const counterCell = FeatureCell&lt;number&gt;({<br> key: ‘counter’,<br> initialState: 0<br>});</p><p>counterCell.initialize();<br>```</p><p>&gt; **Warning:** Vault initialization must precede FeatureCell registration. Registering a FeatureCell before the Vault runtime is initialized is invalid and results in a runtime error. Each FeatureCell key may be registered exactly once.</p><p>## Reading Reactive State in a Vue Component</p><p>Inside the component, call `useReactiveState()` once during `setup` and render from the readonly reactive Snapshot it returns. The Snapshot exposes `value`, `hasValue`, `isLoading`, and `error` fields that stay reactive as state changes — the effect scope owns the subscription lifecycle, so there is nothing to unsubscribe.</p><p>```typescript<br>&lt;script setup lang=”ts”&gt;<br>import { counterCell } from ‘./counter.cell’;</p><p>const snapshot = counterCell.useReactiveState();</p><p>function increment() {<br> counterCell.replaceState(counterCell.state.value + 1);<br>}<br>&lt;/script&gt;</p><p>&lt;template&gt;<br> &lt;p v-if=”snapshot.isLoading”&gt;Loading…&lt;/p&gt;<br> &lt;p<br> v-else-if=”snapshot.error”<br> role=”alert”<br> v-text=”snapshot.error.message”&gt;<br> &lt;/p&gt;<br> &lt;p v-else-if=”!snapshot.hasValue”&gt;No State is available.&lt;/p&gt;<br> &lt;p v-else v-text=”’Count: ‘ + snapshot.value”&gt;&lt;/p&gt;<br> &lt;button type=”button” <a href="http://twitter.com/click">@click</a>=”increment”&gt;Increment&lt;/button&gt;<br>&lt;/template&gt;<br>```</p><p>Two details make this example behave the way you’d expect — where you read reactively, and where you read imperatively.</p><p>- The handler reads `counterCell.state.value`, not the reactive `snapshot`. Imperative code — event handlers and logic outside an effect scope — uses the synchronous `state` surface, while `useReactiveState()` stays the render surface.<br>- There is no `async` or `await`. `replaceState()` returns `void`, and the reactive Snapshot updates the `Count:` line on its own the moment the pipeline commits.</p><p>&gt; **Warning:** Call `useReactiveState()` during component setup or within an active Vue effect scope. It hands the component the current Snapshot _and_ connects it to later changes. A manual `state$` subscription created after the cell has initialized can miss the emission that committed the initial state.</p><p>## Atomic Updates and Why They Matter</p><p>You update a FeatureCell by submitting a new value into its pipeline. `replaceState()` fully replaces the committed state with the resolved incoming value; `mergeState()` structurally combines the existing state with an incoming value. Both run the full pipeline and return `void` — you never await anything. Call one and move on. When the pipeline commits the new state, the reactive Snapshot from `useReactiveState()` updates on its own and your component re-renders. The commit drives the UI; your call site doesn’t wait for it.</p><p>The update does not mutate the existing state directly. The incoming value is resolved and processed through the pipeline, and the current committed state is replaced only when that work finishes. Your component observes the new `StateSnapshotShape` as one complete value — never a half-applied intermediate.</p><p>&gt; **Key takeaway:** Because state snapshots are immutable and commitment is atomic, a Vue component reading through `useReactiveState()` always sees a whole, consistent value. There is no window where the UI can render a partially updated state.</p><p>## Try It Yourself</p><p>Scoped ownership, reactive reads, and atomic updates — all in a few lines, with the same core engine you would run anywhere else. A live, editable StackBlitz demo (`vue-feature-cell-counter`) is available in the [canonical post](<a href="https://www.sdux-vault.com/blog/state-management-in-vue-without-a-store">https://www.sdux-vault.com/blog/state-management-in-vue-without-a-store</a>).</p><p>Explore the full [Vue integration reference](<a href="https://www.sdux-vault.com/docs/pipeline/api/vue">https://www.sdux-vault.com/docs/pipeline/api/vue</a>) to see `useReactiveState()` in depth, and read the [FeatureCell API](<a href="https://www.sdux-vault.com/docs/references/functions/feature-cell">https://www.sdux-vault.com/docs/references/functions/feature-cell</a>) for the full registration contract.</p><p>Learn more about SDuX Vault on [GitHub →](<a href="https://github.com/sdux-vault">https://github.com/sdux-vault</a>).</p><p>## Watch It</p><p>- [Pipeline Overview](<a href="https://www.youtube.com/watch?v=m7ClyWSh754">https://www.youtube.com/watch?v=m7ClyWSh754</a>)<br>- [Atomic State](<a href="https://www.youtube.com/watch?v=TRlvCmluBcE">https://www.youtube.com/watch?v=TRlvCmluBcE</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25ca46a38060" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No Middleware Registration Order — Pipeline Stages That Always Execute the Same Way]]></title>
            <link>https://medium.com/@sduxvault/no-middleware-registration-order-pipeline-stages-that-always-execute-the-same-way-e89e0286e173?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/e89e0286e173</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 23:22:41 GMT</pubDate>
            <atom:updated>2026-07-13T23:22:41.196Z</atom:updated>
            <content:encoded><![CDATA[<p># No Middleware Registration Order — Pipeline Stages That Always Execute the Same Way</p><p>Redux middleware runs in registration order. Change the order, change the behavior — and there is no contract about who goes first. SDuX Vault replaces unordered middleware with a fixed, guaranteed sequence of pipeline stages. Same order. Every time. Deterministic.</p><figure><img alt="Redux middleware runs in registration order with no execution contract. A fixed pipeline replaces it with a guaranteed stage order that executes the same way every time." src="https://cdn-images-1.medium.com/max/1024/1*BGGtTAiyPi5fcj2zlvV7UQ.jpeg" /></figure><p>This post explains why implicit middleware ordering is a source of production bugs, how a fixed pipeline removes the ambiguity, and what changes when execution order becomes an architectural guarantee instead of a registration accident.</p><p>&gt; **Key takeaway:** Redux middleware executes in implicit registration order with no execution contract.</p><p>&gt; **Key takeaway:** SDuX Vault pipeline stages execute in a fixed, guaranteed order every time.</p><p>## The Middleware Ordering Problem</p><p>In Redux, middleware is composed into a chain when you configure the store. Each middleware wraps the next, and the order you pass them to `applyMiddleware()` determines the order they run. The chain is real, but the contract is implicit — nothing in the type system or the runtime tells you what order is correct.</p><p>```typescript<br>// The order here IS the behavior.<br>const store = createStore(rootReducer, applyMiddleware(logger, thunk, analytics));</p><p>// Swap two entries and the app behaves differently:<br>const store = createStore(rootReducer, applyMiddleware(thunk, logger, analytics));<br>// Now the logger sees resolved thunks instead of raw actions.<br>```</p><p>The problems this creates are subtle because the code that breaks is not the code that changed:</p><p>- **Order is invisible at the call site.** A component dispatching an action has no way to know which middleware will run first. The behavior lives in the store configuration, far from where the action is fired.<br>- **Registration order drifts.** When teams add middleware over time — a logger here, a crash reporter there — the chain grows. Each addition can change the behavior of every middleware downstream of it.<br>- **Async middleware compounds the ambiguity.** Thunks, sagas, and observable middleware dispatch new actions at arbitrary times. The order in which those follow-up actions hit the reducer tree depends on both the middleware chain and runtime timing.<br>- **There is no enforced contract.** Two valid orderings can both compile, both pass a subset of tests, and produce different results in production.</p><p>## A Fixed, Ordered Pipeline</p><p>SDuX Vault does not compose middleware. Every state update flows through a deterministic pipeline whose stage order is fixed by the architecture — not by the order in which you register behaviors. You register reducers, filters, taps, and other behaviors in any order that reads well; the pipeline still executes each stage in its canonical position.</p><p>The migration guide frames the contrast directly:</p><p>&gt; **Key takeaway:** Instead of middleware dispatching new actions at arbitrary times, asynchronous results enter the pipeline as controlled attempts. Async inputs are resolved under pipeline coordination before state commitment occurs.</p><p>Registration expresses _what_ participates. The pipeline decides _when_ each stage runs. Those two concerns are separated, so adding a new behavior never reorders the ones already in place.</p><p>```typescript<br>// Register in any order that reads well.<br>cartCell.afterTaps([logCommit]).filters([rejectEmptyCart]).reducers([computeTotal]).initialize();</p><p>// The pipeline still runs stages in their canonical order:<br>// resolve → merge → filter → reduce → after-tap → state<br>// The reducer always runs before the after-tap, regardless of<br>// the order the methods were called above.<br>```</p><p>## The Guaranteed Pipeline Stages</p><p>Every update traverses the same ordered stages, grouped into layers. The order below is fixed for the lifetime of the FeatureCell. For the complete architectural index, see the pipeline architecture reference on sdux-vault.com.</p><p>| Stage | Layer | Primary Responsibility |<br>| — — — — — — — — — — | — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| Queue | Policy | Serializes attempts through a FIFO queue, one at a time |<br>| Policy (Controllers) | Policy | Allows, denies, or aborts an update before computation |<br>| Interceptors | Pre-Processing | Admission control and conditional gating |<br>| Resolve | Processing | Normalizes incoming input into a resolved candidate |<br>| Merge | Processing | Combines committed state with the resolved candidate |<br>| Operators | Processing | Refines or suppresses the merged candidate |<br>| Filters | Processing | Refines or suppresses candidates before reduction |<br>| Reducers | Processing | Computes the finalized candidate state |<br>| State | Post-Processing | Commits and reactively emits the finalized snapshot |</p><p>&gt; **Key takeaway:** Observational taps run in fixed positions too — Before Tap executes prior to reduction and After Tap executes after reduction. Their position is guaranteed by the pipeline, not by the order you register them.</p><p>## Why Order Matters More Than You Think</p><p>Execution order is not a stylistic detail — it decides correctness. When order is implicit, the same code produces different results depending on how the chain was assembled.</p><p>| Concern | Redux Middleware | SDuX Vault Pipeline |<br>| — — — — — — — — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| What defines order | Registration sequence in applyMiddleware() | Fixed pipeline stage architecture |<br>| Effect of adding a new participant | Can reorder every downstream middleware | Slots into its canonical stage; nothing else moves |<br>| Contract enforcement | Implicit — no runtime or type guarantee | Guaranteed — stage order is invariant |<br>| Reproducibility | Depends on chain assembly and runtime timing | Identical on every execution |</p><p>&gt; **⚠️ Warning:** The most expensive middleware ordering bugs are the ones that only appear after a refactor. A crash reporter added to the end of the chain silently changes what an earlier logging middleware sees. Nothing in the changed file is wrong — the defect lives in the interaction between registration order and runtime behavior.</p><p>## Debugging Deterministic Execution</p><p>A fixed pipeline changes what debugging feels like. When the stage order can never vary, a reproduction is a reproduction — the pipeline that produced a bug in production is the same pipeline that runs in your test.</p><p>- **No timing-dependent surprises.** The execution guarantee serializes concurrent inputs and commits state at a microtask boundary, so observers never see partial or interleaved results.<br>- **The stage list is the mental model.** To reason about an update you follow the fixed order top to bottom. There is no separate “middleware chain” to reconstruct from store configuration.<br>- **Tests match production.** Because order cannot drift, the act → settle → assert test path exercises the exact stage sequence your users hit.</p><p>```typescript<br>it(‘applies the total after reduction’, async () =&gt; {<br> // act — submit a state update<br> cartCell.mergeState({ items: mockItems });</p><p>// settle — wait for the pipeline to complete<br> await vaultSettled(‘cart’);</p><p>// assert — the reducer ran before the after-tap, every time<br> expect(cartCell.state.total).toBe(42);<br>});<br>```</p><p>## Deeper Dive</p><p>The clearest way to feel the difference is to stop reasoning about registration order entirely. Register your behaviors in whatever order reads best and trust the pipeline to run each stage in its fixed position.</p><p>- [Pipeline Architecture — the full ordered stage index](<a href="https://www.sdux-vault.com/docs/pipeline/behaviors/complete-pipeline-spec">https://www.sdux-vault.com/docs/pipeline/behaviors/complete-pipeline-spec</a>)<br>- [Pipeline Execution Guarantee](<a href="https://www.sdux-vault.com/docs/pipeline/execution-guarantee">https://www.sdux-vault.com/docs/pipeline/execution-guarantee</a>)<br>- [Redux Concepts in SDuX Vault — full concept mapping](<a href="https://www.sdux-vault.com/docs/migration">https://www.sdux-vault.com/docs/migration</a>)<br>- [Stackblitz](<a href="https://www.sdux-vault.com/docs/stackblitz">https://www.sdux-vault.com/docs/stackblitz</a>)</p><p>Add one behavior to a FeatureCell, then reorder your registration calls and watch the committed result stay identical. Order stops being something you manage and becomes something you can rely on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e89e0286e173" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing Without Mock Stores — act, settle, assert]]></title>
            <link>https://medium.com/@sduxvault/testing-without-mock-stores-act-settle-assert-82f2d8f7ea6d?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/82f2d8f7ea6d</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[state-management]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 11:04:01 GMT</pubDate>
            <atom:updated>2026-07-09T11:04:01.324Z</atom:updated>
            <content:encoded><![CDATA[<p># Testing Without Mock Stores — act, settle, assert</p><p>Redux testing requires mock stores, fake dispatch queues, middleware orchestration, and marathon sessions debugging non-deterministic behavior. SDuX Vault testing is three words: act, settle, assert. No mock store. No fake dispatch. The pipeline is deterministic — same input, same output, every time.</p><figure><img alt="Pipeline-based state management for Angular, Node.js, React, Svelte &amp; Vue. Declare state once — predictable pipelines handle the rest. ✦ Pure TypeScript — no decorators, no magic strings ✦ Framework-agnostic — works identically across all supported frameworks ✦ Predictable pipelines — Resolve → Merge → Filter → Reduce → Emit ✦ Drop-in Redux reducer compatibility — without the boilerplate ✦ Built-in DevTools with pipeline inspector Open-source · MIT Licensed Docs &amp; live demos → sdux-vault.com" src="https://cdn-images-1.medium.com/max/513/1*e345N9HLcQ4CrVIXr5MYCg.png" /></figure><p>— -</p><p>## The Redux Testing Tax</p><p>In Redux, testing state changes means wiring up mock stores, fake dispatch functions, and explicit middleware stacks. Every async side effect — whether handled by thunks, sagas, or observables — requires careful orchestration and often manual timer resolution.</p><p>The burden compounds when multiple middleware interact with the same state. Execution order is undefined. A saga might dispatch before a thunk settles. A reducer might commit state while an effect is in flight. Your tests have to account for all possible interleavings — which means more assertions, more setup, more brittle tests.</p><p>And then come the flaky tests. Tests that pass locally but fail in CI. Tests that pass when run individually but fail in suite. Tests that hang on timers and force you to guess how much time to wait.</p><p>&gt; **Key takeaway:** Redux’s unguaranteed execution order means tests can’t assume deterministic behavior. Every async flow is a potential race condition.</p><p>— -</p><p>## What Deterministic Testing Looks Like</p><p>SDuX Vault executes state updates through a serialized pipeline with explicit settlement boundaries. That means tests can do something Redux tests can’t: trust the output without mocking the framework.</p><p>The canonical testing pattern is three words:</p><p>- **act** — trigger a state mutation (or behavior)<br>- **settle** — wait for the pipeline to finalize<br>- **assert** — verify the committed state</p><p>No mock store. No fake dispatch. Just the real pipeline running through its deterministic execution model.</p><p>```typescript<br>it(‘adds an item to the cart and updates total’, async () =&gt; {<br> // act — trigger a state mutation<br> cartCell.mergeState({<br> items: [{ id: 1, price: 29.99 }],<br> total: 29.99<br> });</p><p>// settle — wait for the pipeline to finish<br> await vaultSettled(‘cart’);</p><p>// assert — verify the committed state<br> expect(cartCell.state.total).toBe(29.99);<br> expect(cartCell.state.items.length).toBe(1);<br>});<br>```</p><p>That’s it. No test setup. No mock store initialization. No dispatch sequence assertions. Just: did the state end up where we expect?</p><p>— -</p><p>## Why This Works: Determinism as a Feature</p><p>SDuX Vault’s pipeline is engineered to be deterministic. Every stage executes in a fixed order. State commits are atomic — either the snapshot commits completely or nothing changes. No intermediate visibility. No torn state. No reentrancy.</p><p>That architecture makes testing simple because:</p><p>- **No execution order surprises.** When you settle, the pipeline has finished. You don’t have to guess which middleware went first or whether async effects are still in flight.<br>- **Atomic snapshots eliminate partial renders.** Your test sees the final state, not an intermediate representation caught mid-update. No stale or torn views.<br>- **Serialized execution prevents race conditions.** Multiple state updates queue and execute sequentially. The test doesn’t have to coordinate or mock dispatch timing.</p><p>This is why **determinism eliminates flaky tests**. When execution is guaranteed, you don’t need to rely on timing assumptions or timer trickery. Same input = same output, every time.</p><p>&gt; **⚠️ Warning:** Treating `vaultSettled()` like a timer is a common mistake. It’s not. It waits for the pipeline’s deterministic boundary — the point where all execution is complete. If you trigger multiple state updates, `vaultSettled()` will wait for all of them to finish, not just the first one.</p><p>— -</p><p>## Async and Effects — No Mock Middleware Required</p><p>In Redux, testing async effects means mock thunks, mock sagas, or marble diagram matchers. SDuX Vault handles async differently: through resolve behaviors and controllers that are part of the pipeline’s fixed execution sequence.</p><p>Because the pipeline serializes execution, you test async effects the same way you test sync state — act, settle, assert.</p><p>```typescript<br>it(‘resolves and commits an API response’, async () =&gt; {<br> // Setup: mock fetch to return resolved promise<br> spyOn(window, ‘fetch’).and.returnValue(<br> Promise.resolve({<br> json: () =&gt; Promise.resolve({ userId: 42, name: ‘Alice’ })<br> })<br> );</p><p>// act — trigger a resolve behavior (or mergeState that triggers it)<br> userCell.mergeState({ userId: null });</p><p>// settle — wait for the resolve behavior to complete<br> await vaultSettled(‘user’);</p><p>// assert — the resolved value is now committed<br> expect(userCell.state.userId).toBe(42);<br> expect(userCell.state.name).toBe(‘Alice’);<br>});<br>```</p><p>No thunk mock. No saga mock. No timer flushing. The pipeline orchestrates the async flow, and `vaultSettled` waits for it to land.</p><p>— -</p><p>## Reducers Stay Pure (and Testable)</p><p>One concern when migrating from Redux: “Will I have to rewrite my reducer tests?” The answer is no. Pure reducer functions are still pure. SDuX Vault reducers have a simple contract: `(current: T) =&gt; T`. They receive the current state and return the next state.</p><p>You can test reducers in isolation, just like in Redux. The difference is that in SDuX Vault, reducers are registered declaratively and execute in a fixed pipeline order — so integration tests don’t have to mock the state container.</p><p>```typescript<br>// Reducer receives only the current state and reduces it<br>const sortByNameReducer = (current) =&gt; ({<br> …current,<br> items: […current.items].sort((a, b) =&gt; a.name.localeCompare(b.name))<br>});</p><p>// Test in isolation — pure function, no mocking needed<br>it(‘sorts items by name immutably’, () =&gt; {<br> const initial = {<br> items: [<br> { id: 2, name: ‘Bob’ },<br> { id: 1, name: ‘Alice’ }<br> ]<br> };<br> const sorted = sortByNameReducer(initial);</p><p>expect(sorted.items[0].name).toBe(‘Alice’);<br> expect(sorted.items[1].name).toBe(‘Bob’);<br> expect(initial.items[0].name).toBe(‘Bob’); // Original unchanged<br>});<br>```</p><p>Pure functions are testable regardless of the framework. In SDuX Vault, when you register reducers via `.reducers()`, they execute in a fixed pipeline order — so integration tests don’t have to mock the state container or coordinate dispatch timing.</p><p>— -</p><p>## Before and After: A Side-by-Side Comparison</p><p>Here’s the same test scenario in both systems:</p><p>| Aspect | Redux | SDuX Vault |<br>| — — — — — — — — — — — — — — — — | — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| Mock store creation | Required | None — use the real FeatureCell |<br>| Mock dispatch function | Required | None — call `cell.mergeState()` directly |<br>| Middleware orchestration | Required | None — pipeline stages are fixed |<br>| Timer resolution (fake timers) | Required | None — use `vaultSettled()` |<br>| Async effect mocking | Mock thunks/sagas | Just mock the API — pipeline handles orchestration |<br>| Action sequence assertions | Required | Assert final state directly — no sequence needed |<br>| Flaky tests from race conditions | Common | Eliminated — deterministic pipeline |</p><p>The difference accumulates. Fewer mocks. Fewer timing assumptions. Fewer ways for tests to be wrong.</p><p>— -</p><p>## The Testing Guarantee</p><p>SDuX Vault’s commitment to testing rigor is deliberate. The framework was engineered from the ground up so that tests are deterministic, isolated, and trustworthy. Not as an afterthought — as a first-class design priority.</p><p>That commitment means: if your test passes locally, it will pass in CI. Same input, same output. No timing mysteries. No flaky retries. Just clear, reproducible behavior.</p><p>&gt; **Key takeaway:** Want to dive deeper? Read the [complete Testing guide](<a href="https://www.sdux-vault.com/docs/top-tier/testing">https://www.sdux-vault.com/docs/top-tier/testing</a>) for details on settlement APIs, scheduler layers, and framework-specific patterns.</p><p>— -</p><p>## Try It Yourself</p><p>Start a new SDuX Vault project with a StackBlitz demo and write your first deterministic test. No mock store required.</p><p>- [Open the StackBlitz Example](<a href="https://www.sdux-vault.com/examples/angular/replace-state">https://www.sdux-vault.com/examples/angular/replace-state</a>) — live demo of state management across frameworks<br>- [Testing Documentation](<a href="https://www.sdux-vault.com/docs/top-tier/testing">https://www.sdux-vault.com/docs/top-tier/testing</a>) — complete API reference and patterns<br>- [Redux Migration Guide](<a href="https://www.sdux-vault.com/docs/migration">https://www.sdux-vault.com/docs/migration</a>) — map Redux concepts to SDuX Vault constructs</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82f2d8f7ea6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Selectors Without a Global Tree — Scoped State Access That Scales]]></title>
            <link>https://medium.com/@sduxvault/selectors-without-a-global-tree-scoped-state-access-that-scales-9778fc523016?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/9778fc523016</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[webdev]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 12:56:34 GMT</pubDate>
            <atom:updated>2026-07-02T12:56:34.708Z</atom:updated>
            <content:encoded><![CDATA[<p>Redux selectors project slices from a global store tree. When the tree changes shape, every selector downstream breaks. Memoization libraries patch the performance problem but not the coupling problem. SDuX Vault™ eliminates the global tree entirely. State access is scoped to the owning FeatureCell™ — no global registry, no tree coupling, no cascade failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*oXB20COYh1EAarR2CEv-9w.png" /></figure><p>## Global Selectors and Their Fragility</p><p>In Redux, every selector receives the entire state tree. A selector that reads `state.users.active` is coupled to the exact shape of the root store. Rename the slice, nest it under a feature module, or restructure the reducer tree — and every selector that touches that path breaks.</p><p>```typescript<br>// Redux selector — coupled to the global store shape<br>const selectActiveUsers = (state: RootState) =&gt; state.users.active;</p><p>// If the tree restructures:<br>// state.users.active → state.features.users.active<br>// This selector breaks silently — returns undefined<br>```</p><p>The fragility compounds at team scale. When two teams share a global store, one team’s reducer restructuring silently breaks the other team’s selectors. Memoization libraries like Reselect help avoid unnecessary recomputation, but they do not solve the structural coupling — they optimize a selector that is still tightly bound to a global path.</p><p>| Problem | Root Cause |<br>| — — — — — — — — — — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| Selectors break on store restructuring | Coupled to global state tree paths |<br>| Cross-team selector collisions | Shared global namespace |<br>| Memoization complexity | Reselect required to prevent unnecessary recomputation |<br>| Cascade failures | One tree change breaks downstream selectors |</p><p>&gt; **⚠️ Warning:** The problem is not the selector pattern itself — projecting derived state from a data source is sound engineering. The problem is that Redux selectors project from a **global** tree, making every selector an implicit dependency on the store’s structural shape.</p><p>## Scoped State Access in SDuX</p><p>SDuX Vault does not use a global store. State is owned by individual FeatureCells. Each FeatureCell maintains its own isolated state and execution lifecycle. There is no root reducer tree, no global namespace, and no shared state path.</p><p>State access is scoped to the FeatureCell that owns it. You access state through the cell’s reactive APIs — not through a global projection function:</p><p>- `.state` — synchronous immutable snapshot<br>- `.state$` — reactive observable stream</p><p>```typescript<br>import { FeatureCell } from ‘<a href="http://twitter.com/sdux">@sdux</a>-vault/core’;</p><p>const userCell = FeatureCell(‘users’, { value: [] });<br>userCell.initialize();</p><p>// Synchronous snapshot — no global tree path<br>const activeUsers = userCell.state.value.filter((u) =&gt; u.active);</p><p>// Reactive stream — scoped to this FeatureCell<br>userCell.state$.subscribe((snapshot) =&gt; {<br> const active = snapshot.value.filter((u) =&gt; u.active);<br> console.log(active);<br>});<br>```</p><p>Because the FeatureCell itself is injectable, any component, service, or controller that injects it receives the same reactive state source. There is no global selector registry to maintain, no path strings to keep in sync, and no cascade failures when another team changes their state shape.</p><p>&gt; **Key takeaway:** Selectors in SDuX Vault are not global projections. They are scoped, reusable views of a specific state owner. The owning FeatureCell is the boundary — not a position in a global tree.</p><p>## Reactive APIs — .state$ and .state.value()</p><p>SDuX Vault provides multiple state access surfaces to match different consumption patterns. All surfaces read from the same atomic snapshot produced by the pipeline — they differ only in how they deliver updates to consumers.</p><p>| API | Type | Use Case |<br>| — — — — — — — — | — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — |<br>| `.state` | Synchronous snapshot | Read current value in imperative code |<br>| `.state$` | Observable stream | React to state changes over time |<br>| `.state.value()` | Angular signal | Signal-based rendering in Angular templates |</p><p>Every surface reads from the same committed snapshot. When the pipeline completes and commits state, all surfaces update atomically. There are no intermediate values, no stale reads, and no timing-dependent inconsistencies between the synchronous getter and the reactive stream.</p><p>Derived state can be implemented using plain TypeScript functions, computed signals (Angular), RxJS operators on `.state$`, or getter methods colocated with the FeatureCell.</p><p>## When Memoization Still Matters</p><p>Scoped state access eliminates the structural coupling that makes Redux selectors fragile, but it does not eliminate the need for memoization in all cases. If you derive expensive computed values from state — filtering large arrays, joining across multiple properties, computing aggregates — memoization still helps avoid unnecessary recomputation.</p><p>The difference is that memoization in SDuX Vault is simpler to reason about:</p><p>- State updates are atomic and deterministic — you know exactly when recomputation will trigger<br>- The input to your derived function is a single FeatureCell snapshot, not a global tree slice<br>- RxJS `distinctUntilChanged` provides built-in change detection without a separate memoization library</p><p>You do not need Reselect, createSelector, or any selector composition library. Standard language-level memoization patterns work because the input boundary is well-defined and stable.</p><p>&gt; **Key takeaway:** Memoization strategies remain valid in SDuX Vault. However, because state updates are atomic and deterministic, recomputation behavior is easier to reason about. You know exactly when the snapshot changed and exactly what changed — no Reselect dependency graph required.</p><p>## Redux Comparison</p><p>Redux selectors project from a global store tree, requiring composition and memoization libraries to manage coupling and performance. SDuX Vault provides scoped reactive state directly from the owning FeatureCell.</p><p>| Dimension | Redux Selectors | SDuX |<br>| — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| Data source | Global state tree | Owning FeatureCell |<br>| Coupling | Coupled to tree path structure | Scoped to cell — no tree dependency |<br>| Memoization | Required (Reselect / createSelector) | Optional — built-in signals and distinctUntilChanged |<br>| Cross-team impact | One restructure breaks downstream selectors | Cells are independent — no cascade failures |<br>| Derived state | Selector composition chains | Plain functions, computed signals, RxJS operators |<br>| State consistency | Depends on middleware ordering | Atomic snapshots from deterministic pipeline |</p><p>## Try It Yourself</p><p>Explore scoped state access and reactive APIs in a live example:</p><p>- [FeatureCell API — state, state$, and state.value()](<a href="https://www.sdux-vault.com/docs/pipeline/apis/feature-cell-api">https://www.sdux-vault.com/docs/pipeline/apis/feature-cell-api</a>)<br>- [Redux Concepts in SDuX — Selectors](<a href="https://www.sdux-vault.com/docs/migration#selectors">https://www.sdux-vault.com/docs/migration#selectors</a>)<br>- [Pipeline Execution Guarantees](<a href="https://www.sdux-vault.com/docs/pipeline/execution-guarantee">https://www.sdux-vault.com/docs/pipeline/execution-guarantee</a>)<br>- [StackBlitz Examples](<a href="https://www.sdux-vault.com/docs/stackblitz">https://www.sdux-vault.com/docs/stackblitz</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9778fc523016" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing the SDuX Vault Pipeline Video]]></title>
            <link>https://medium.com/@sduxvault/introducing-the-sdux-vault-pipeline-video-24661441dfb3?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/24661441dfb3</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[ceremony]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 16:56:47 GMT</pubDate>
            <atom:updated>2026-06-30T16:56:47.082Z</atom:updated>
            <content:encoded><![CDATA[<p># Introducing the SDuX Vault Pipeline Video</p><p>Today I’m excited to share something I’ve wanted to build for a long time — the first SDuX Vault™ video. It walks through the entire deterministic pipeline from end to end, and it marks a real step forward in how we deliver world-class documentation and training for engineers.</p><figure><img alt="he first SDuX Vault video walks through the entire deterministic pipeline architecture — 10 stages, 3 execution boundaries, and atomic state commitment — in under 5 minutes." src="https://cdn-images-1.medium.com/max/480/1*_g5pGsjpwvFIEnP1e3KDOA.png" /></figure><p>## Why Video</p><p>Written documentation is the backbone of any serious library. But some concepts — especially a 10-stage pipeline that executes atomically — benefit from seeing the flow animated in real time. Video lets you watch state move through each layer and stage without jumping between doc pages.</p><p>This is the first of many. The pipeline overview sets the foundation; future videos will dive into individual stages, testing patterns, and real-world integration scenarios.</p><p>## What the Video Covers</p><p>The video walks through the complete SDuX Vault pipeline architecture in under 5 minutes. Here’s the breakdown:</p><p>| Chapter | Description | Timestamp |<br>| — — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — | — — — — — |<br>| What is SDuX Vault | High-level introduction to the framework-agnostic state management engine | 0:00 |<br>| Pipeline Definition | What a pipeline is and how it differs from traditional dispatch models | 0:39 |<br>| Pipeline Parts | The core building blocks that compose a pipeline execution | 1:18 |<br>| Pipeline Layers | Conductor, Orchestrator, and FeatureCell definitions — the three execution boundaries | 1:35 |<br>| Pipeline Stages | All 10 stages defined — Resolve through After Tap | 2:30 |<br>| Pipeline is Atomic | How the pipeline guarantees all-or-nothing state commitment | 3:24 |<br>| SDuX Vault Guarantees | The execution guarantees enforced at every pipeline boundary | 4:22 |</p><p>## Watch It</p><p>The video is available now on YouTube:</p><p>[SDuX Vault Pipeline — How Every State Change Flows Through a Deterministic Pipeline](<a href="https://youtu.be/m7ClyWSh754">https://youtu.be/m7ClyWSh754</a>)</p><p>This is just the beginning. More videos are coming — each one focused on making SDuX engineering knowledge accessible to every developer, regardless of framework.</p><p>## Explore the Docs</p><p>Want to dig deeper into what the video covers? Start with the [Pipeline Architecture](<a href="https://www.sdux-vault.com/docs/pipeline/pipeline-architecture">https://www.sdux-vault.com/docs/pipeline/pipeline-architecture</a>) page or jump straight to the [Complete Pipeline Spec](<a href="https://www.sdux-vault.com/docs/pipeline/behaviors/complete-pipeline-spec">https://www.sdux-vault.com/docs/pipeline/behaviors/complete-pipeline-spec</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24661441dfb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Global Dispatch Broadcasts to Everything — Scoped Updates Don’t]]></title>
            <link>https://medium.com/@sduxvault/global-dispatch-broadcasts-to-everything-scoped-updates-dont-166d18f398ed?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/166d18f398ed</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[code-refactoring]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 15:17:28 GMT</pubDate>
            <atom:updated>2026-06-25T15:17:28.771Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Every Redux dispatch broadcasts to the entire reducer tree. SDuX Vault targets the owning FeatureCell directly — no broadcast, no wasted cycles." src="https://cdn-images-1.medium.com/max/800/1*Om66cmj9kQnArOW7wLgttA.png" /></figure><p># Global Dispatch Broadcasts to Everything — Scoped Updates Don’t</p><p>Every Redux dispatch broadcasts to the entire reducer tree. Every reducer evaluates. Every selector re-checks. In SDuX Vault™, updates target the owning FeatureCell™ directly — no broadcast, no global evaluation, no wasted cycles.</p><p>## How Dispatch Works in Redux</p><p>Redux uses a single global store. When you call `dispatch(action)`, that action is sent through middleware and then delivered to the entire reducer tree.</p><p>```typescript<br>// Every dispatch broadcasts globally<br>dispatch({ type: ‘ADD_USER’, payload: user });</p><p>// This action is delivered to EVERY reducer in the tree:<br>// — userReducer ✓ (handles it)<br>// — cartReducer ✗ (evaluates, returns current state)<br>// — settingsReducer ✗ (evaluates, returns current state)<br>// — notificationsReducer ✗ (evaluates, returns current state)<br>// — analyticsReducer ✗ (evaluates, returns current state)<br>```</p><p>Each reducer decides whether to respond based on the action type. Reducers that do not handle the action still execute — they evaluate the switch statement and return the current state unchanged. Every selector downstream then re-checks whether its derived value has changed.</p><p>For a single dispatch in a ten-feature application, you may trigger 10 reducer evaluations and 20+ selector re-checks — even though only one feature cares about that action.</p><p>## The Cost of Global Broadcasting</p><p>The broadcast model was a design choice in Redux: simplicity over precision. Every action goes everywhere, and reducers opt in by matching the type string. This has compounding costs:</p><p>| Cost | Impact |<br>| — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — |<br>| Reducer evaluations | Every reducer runs on every dispatch — O(n) per action |<br>| Selector re-checks | Memoized selectors still compare references on every store change |<br>| Middleware overhead | Every action passes through the full middleware chain |<br>| Cognitive coupling | Any reducer can respond to any action — ownership is implicit |<br>| Debugging noise | DevTools show every action globally, making feature-level tracing harder |</p><p>&gt; **⚠️ Warning:** The performance cost is often acceptable in small applications. But as your reducer tree grows, every dispatch pays a tax proportional to the total number of reducers and selectors — regardless of how many actually need to respond.</p><p>## Scoped Updates in SDuX Vault</p><p>SDuX Vault does not use global dispatch. State updates are invoked directly on the owning FeatureCell using `mergeState()` or `replaceState()`.</p><p>**Angular:**</p><p>```typescript<br>import { injectVault } from ‘<a href="http://twitter.com/sdux">@sdux</a>-vault/angular’;</p><p>// Inject the specific FeatureCell that owns user state<br>const userCell = injectVault(‘user’);</p><p>// Update targets ONLY the user FeatureCell<br>// No other FeatureCell evaluates. No global broadcast.<br>userCell.mergeState({ value: { name: ‘Alice’, role: ‘admin’ } });<br>```</p><p>**React / Vue / Svelte:**</p><p>```typescript<br>import { FeatureCell } from ‘<a href="http://twitter.com/sdux">@sdux</a>-vault/core’;</p><p>const userCell = FeatureCell(‘user’, { value: defaultUser });</p><p>// Update targets ONLY the user FeatureCell<br>// No other FeatureCell evaluates. No global broadcast.<br>userCell.mergeState({ value: { name: ‘Alice’, role: ‘admin’ } });<br>```</p><p>When you call `mergeState()`, you are explicitly updating that specific FeatureCell — not broadcasting an event to a global store. No other FeatureCell evaluates. No reducer tree walks. No selector cascade.</p><p>&gt; **Key takeaway:** The update target is unambiguous. The state owner is known at the call site, and execution flows through a deterministic pipeline scoped to that single FeatureCell. Other FeatureCells remain completely unaffected.</p><p>## What This Means for Performance</p><p>The difference is structural. In Redux, cost scales with total application size. In SDuX Vault, cost scales with the feature being updated.</p><p>| Concern | Redux | SDuX Vault |<br>| — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — — | — — — — — — — — — — — — — — — — — — — — — — — |<br>| Update routing | Global broadcast to all reducers | Direct method call on owning FeatureCell |<br>| Evaluation scope | Entire reducer tree (O(n) reducers) | Single FeatureCell pipeline (O(1)) |<br>| Selector impact | All subscribed selectors re-check | Only observers of the updated cell re-evaluate |<br>| Scaling cost | Grows with total app feature count | Constant per update — independent of app size |<br>| Ownership clarity | Implicit — any reducer can respond to any action | Explicit — method called on state owner |</p><p>A fifty-feature application with Redux pays the broadcast tax on every single dispatch. A fifty-feature application with SDuX Vault pays only the cost of the single FeatureCell being updated — the other forty-nine are untouched.</p><p>## Beyond Performance — Ownership and Intent</p><p>Scoped updates are not just a performance optimization. They enforce architectural clarity:</p><p>- **Ownership is explicit.** The method is called on the state owner. There is no ambiguity about which feature handles the update.<br>- **Cross-feature coupling is eliminated.** One FeatureCell cannot accidentally respond to another feature’s state change. Each cell only knows about its own state.<br>- **Debugging is scoped.** Pipeline execution traces show exactly what happened within a single FeatureCell — no global action log to filter through.<br>- **Testing is isolated.** You test one FeatureCell at a time without mock stores, middleware stacks, or global setup.</p><p>Instead of dispatching an action object and hoping the right reducer picks it up, you submit state input directly into the owning pipeline. The conductor serializes execution, and the pipeline finalizes each attempt in a controlled microtask boundary.</p><p>## Try It Yourself</p><p>See how SDuX Vault eliminates global dispatch broadcasting in favor of scoped, direct state updates:</p><p>- [Redux Concepts in SDuX Vault — Full migration reference](<a href="https://www.sdux-vault.com/docs/migration">https://www.sdux-vault.com/docs/migration</a>)<br>- [Understanding mergeState()](<a href="https://www.sdux-vault.com/docs/pipeline/apis/feature-cell-api/merge-state-method">https://www.sdux-vault.com/docs/pipeline/apis/feature-cell-api/merge-state-method</a>)<br>- [Understanding the Pipeline](<a href="https://www.sdux-vault.com/docs/pipeline">https://www.sdux-vault.com/docs/pipeline</a>)<br>- [Pipeline Execution Guarantees](<a href="https://www.sdux-vault.com/docs/pipeline/execution-guarantee">https://www.sdux-vault.com/docs/pipeline/execution-guarantee</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=166d18f398ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDuX Vault™ 1.0.0 — One Runtime, Every Framework, Zero Dependencies]]></title>
            <link>https://medium.com/@sduxvault/sdux-vault-1-0-0-one-runtime-every-framework-zero-dependencies-90895442cac9?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/90895442cac9</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[angular-state-management]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[react-state-management]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 13:58:29 GMT</pubDate>
            <atom:updated>2026-06-18T13:58:29.936Z</atom:updated>
            <content:encoded><![CDATA[<p># SDuX Vault™ 1.0.0 — One Runtime, Every Framework, Zero Dependencies</p><p>SDuX Vault™ 1.0.0 is here. A pure TypeScript state engine with first-class bindings for Angular, React, Vue, and Node — not because cross-framework is trendy, but because state logic should never be coupled to your rendering layer. This is what “Plain TypeScript, Zero Magic” looks like after shipping 1.0.0.</p><figure><img alt="SDuX Vault official release 1.0 banner. Try is today at https://www.sdux-vault.com" src="https://cdn-images-1.medium.com/max/1000/1*ovDWa0T_tJXc-mGsTbluWg.jpeg" /></figure><p>## Why Framework-Agnostic Was Non-Negotiable</p><p>State management libraries typically live inside a single ecosystem. Angular has NgRx. React has Redux Toolkit and Zustand. Vue has Pinia. Each solves the same fundamental problem — coordinating application state — but they solve it in framework-specific ways that lock you in.</p><p>That coupling creates real costs. Teams migrating from Angular to React rewrite their state layer from scratch. Organizations running multiple frameworks maintain parallel implementations of the same business logic. Knowledge doesn’t transfer across teams because the APIs are completely different.</p><p>SDuX Vault started from a different premise: state transitions are pure logic. They don’t need a component tree, a virtual DOM, or a dependency injection container. They need a typed pipeline that runs the same way everywhere.</p><p>## The Pure TypeScript Core</p><p>The engine is written in TypeScript with zero runtime dependencies. No RxJS. No framework imports. No polyfills. The core package — `<a href="http://twitter.com/sdux">@sdux</a>-vault/core` — contains the complete pipeline runtime: controllers, interceptors, resolvers, filters, reducers, taps, and extensions.</p><p>&gt; **Zero dependencies** means your bundle size stays predictable. SDuX Vault adds only the pipeline runtime — no transitive dependency tree to audit or update.</p><p>Because the core is plain TypeScript, it runs anywhere the language runs: browsers, Node.js servers, Deno, edge workers, test runners. The pipeline doesn’t know or care what renders your UI.</p><p>## First-Class Bindings, Not Afterthoughts</p><p>Framework support in SDuX Vault is delivered through thin binding packages that adapt the core engine to each framework’s idioms:</p><p>| Framework | Binding Package | Integration Style |<br>| — — — — — | — — — — — — — — — — — | — — — — — — — — — — |<br>| Angular | `<a href="http://twitter.com/sdux">@sdux</a>-vault/angular` | Injectable services |<br>| React | `<a href="http://twitter.com/sdux">@sdux</a>-vault/react` | Hooks + context |<br>| Vue | `<a href="http://twitter.com/sdux">@sdux</a>-vault/vue` | Composition API |<br>| Node.js | `<a href="http://twitter.com/sdux">@sdux</a>-vault/core` | Direct instantiation |</p><p>Each binding is a thin adapter — not a reimplementation. The pipeline logic, execution guarantees, and behavior composition are identical across all frameworks. Write your pipeline once, bind it to whichever rendering layer your team uses.</p><p>&gt; **Thin adapters** mean framework upgrades don’t break your state logic. The binding layer changes; the pipeline stays stable.</p><p>## The Pipeline Builder — From Curiosity to Production</p><p>Getting started with a pipeline-based state engine could feel intimidating. That’s why 1.0.0 ships with the [Pipeline Builder](<a href="https://www.sdux-vault.com/pipeline-builder">https://www.sdux-vault.com/pipeline-builder</a>) — an interactive tool that generates production-ready pipeline configurations in minutes.</p><p>Define your state shape, choose your framework, configure pipeline stages, and the Builder outputs copy-paste-ready TypeScript. No boilerplate to memorize. No configuration guessing.</p><p>```typescript<br>const cartCell = FeatureCell(CartService, {<br> key: ‘cart’,<br> initialState: { items: [], total: 0, status: ‘idle’ },<br> behaviors: [resolve(loadCartItems), filter(hasItems), reduce(computeTotal)],<br> controllers: [rateLimit({ maxPerSecond: 10 })]<br>});<br>```</p><p>The Builder doesn’t generate scaffolding you’ll throw away. It generates the same configuration a production app uses — because there’s only one way to configure a pipeline in SDuX Vault.</p><p>## Try It Now — No Install Required</p><p>Every framework binding has a live [StackBlitz demo](<a href="https://www.sdux-vault.com/docs/stackblitz">https://www.sdux-vault.com/docs/stackblitz</a>) you can run in your browser. No local setup, no npm install, no configuration. Open the link, see the pipeline execute, modify it, and watch the state flow in real time.</p><p>Ready to install locally? The `<a href="http://twitter.com/sdux">@sdux</a>-vault/core` package is available on [npm](<a href="https://www.npmjs.com/package/@sdux-vault/core">https://www.npmjs.com/package/@sdux-vault/core</a>). Pick the binding package for your framework and you’re running in under a minute.</p><p>Explore the [architecture docs](<a href="https://www.sdux-vault.com/docs/start-here">https://www.sdux-vault.com/docs/start-here</a>), launch the [Pipeline Builder](<a href="https://www.sdux-vault.com/pipeline-builder">https://www.sdux-vault.com/pipeline-builder</a>), or dive into the [pipeline reference](<a href="https://www.sdux-vault.com/docs/pipeline">https://www.sdux-vault.com/docs/pipeline</a>) to see the full execution model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90895442cac9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pipeline Anatomy — What Happens When You Update State in SDuX Vault]]></title>
            <link>https://medium.com/@sduxvault/pipeline-anatomy-what-happens-when-you-update-state-in-sdux-vault-c758a3e42e83?source=rss-338b38a89c38------2</link>
            <guid isPermaLink="false">https://medium.com/p/c758a3e42e83</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[SDuX Vault]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 20:16:09 GMT</pubDate>
            <atom:updated>2026-06-11T20:16:09.133Z</atom:updated>
            <content:encoded><![CDATA[<p>What actually happens when you call `replaceState` or `mergeState` in SDuX Vault? The answer is not “the value gets written to a store.” The answer is a deterministic, multi-stage pipeline that resolves, filters, reduces, and commits your state change — atomically, every time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iMW8CJFTknlhQhL5TbcOHg.png" /></figure><p>This post walks through that journey step by step.</p><p>## A State Update’s Journey</p><p>When you update state in SDuX Vault, your value enters a structured pipeline. The pipeline is not a metaphor — it’s a literal, ordered sequence of stages that every state update passes through before it becomes visible to your application.</p><p>Here’s the path, in order:</p><p>1. **Policy (Controllers)** — Can this update proceed at all?<br>2. **Interceptors** — Should this update be admitted?<br>3. **Resolve** — Normalize the input into a resolved candidate value.<br>4. **Merge** — Combine the candidate with the current committed state.<br>5. **Operators** — Refine or suppress the merged candidate.<br>6. **Filters** — Further refine or reject the candidate before reduction.<br>7. **Reducers** — Compute the finalized state from the processed value.<br>8. **Taps** — Observe the result (before and after reduction).<br>9. **Persist / Encrypt** — Store the committed snapshot externally.<br>10. **State Commitment** — Emit the final, immutable snapshot.</p><p>Every stage is opt-in. A minimal FeatureCell uses only the core stages (resolve, merge, state). When you add a filter behavior, it runs at the filter stage. When you add a persistence behavior, it runs at the persist stage. Nothing runs unless you declare it.</p><p>&gt; **Key takeaway:** The pipeline is not a black box. Every stage has a fixed position, a clear responsibility, and explicit opt-in registration.</p><p>## Behaviors — The Data Path</p><p>**Behaviors** are the composable building blocks that occupy pipeline stages. Each Behavior performs exactly one function: resolving input, filtering values, reducing state, observing snapshots, or persisting output.</p><p>Here’s what makes Behaviors different from middleware or effects in other state systems:</p><p>- **Stage-bound.** A Behavior runs at exactly one pipeline stage. A filter Behavior cannot run during reduction. A persist Behavior cannot intercept input. The pipeline enforces this structurally.<br>- **Explicitly registered.** A Behavior participates only if you include it in the FeatureCell declaration. If it’s not listed, it doesn’t execute. There is no implicit behavior discovery.<br>- **Composable without coupling.** Behaviors don’t invoke or coordinate with each other. Each one operates on the inputs provided to its stage and returns a result. The pipeline handles ordering and execution.</p><p>There are two categories:</p><p>**Core Behaviors** — Always present. These handle scheduling, input normalization, default merge, and error finalization. You don’t register them; they’re guaranteed for every FeatureCell.</p><p>**Addon Behaviors** — Optional, engineer-selected. These provide capabilities like filtering, operators, taps, persistence, encryption, and error shaping. You register them explicitly when configuring a FeatureCell.</p><p>```typescript<br>export const employeeCell = FeatureCell(<br> EmployeeCell,<br> {<br> key: ‘employees’,<br> initialState: []<br> },<br> [<br> // Addon behaviors — each occupies a specific pipeline stage<br> withArrayMergeBehavior,<br> withDistinctUntilChangedOperator,<br> withLocalStoragePersistBehavior<br> ]<br>);<br>```</p><p>In this declaration, three addon Behaviors extend the pipeline:</p><p>- `withArrayMergeBehavior` runs at the **merge** stage, replacing the default merge strategy with array-aware merging.<br>- `withDistinctUntilChangedOperator` runs at the **operators** stage, suppressing duplicate emissions.<br>- `withLocalStoragePersistBehavior` runs at the **persist** stage, writing committed snapshots to localStorage.</p><p>Each one has a fixed position in the pipeline. You don’t think about ordering — SDuX Vault validates and inserts each Behavior into the correct stage automatically.</p><p>## Controllers — The Policy Path</p><p>While Behaviors handle the _data path_ (what happens to the value), **Controllers** handle the _policy path_ (whether execution proceeds at all).</p><p>Controllers are coordinating authorities. They don’t transform state. They don’t produce values. Instead, they mediate, arbitrate, and finalize control decisions that govern how the pipeline executes.</p><p>Think of Controllers as policy enforcement for your state updates:</p><p>- A **throttle controller** limits how frequently updates can run.<br>- A **max-failures controller** halts the pipeline after repeated errors.<br>- A **tab-sync controller** coordinates state updates across browser tabs.<br>- A **stepwise controller** manages multi-phase resolution.</p><p>Controllers operate _across_ pipeline stages rather than within a single stage. They observe requests emitted by Behaviors, apply centralized decision logic, and issue authoritative outcomes — proceed, deny, buffer, or retry.</p><p>```typescript<br>export const employeeCell = FeatureCell(<br> EmployeeCell,<br> {<br> key: ‘employees’,<br> initialState: []<br> },<br> [<br> withStepwiseResolveBehavior // Behavior (data path)<br> ],<br> [<br> withStepwiseController // Controller (policy path)<br> ]<br>);<br>```</p><p>The fourth array in a FeatureCell declaration is the controller array. Like Behaviors, Controllers are explicitly registered. If a Behavior requires a Controller for coordination, both must be declared — SDuX Vault fails fast if a dependency is missing, rather than silently executing with incomplete authority.</p><p>&gt; **Key takeaway:** Behaviors define _what_ happens to your data. Controllers define _whether_ and _when_ it happens. This separation keeps control logic centralized and deterministic instead of scattered across middleware.</p><p>## The Execution Guarantee</p><p>This is where SDuX Vault fundamentally differs from other state management systems. The pipeline doesn’t just process your update — it guarantees _how_ that processing occurs.</p><p>### Compute First, Commit Later</p><p>SDuX Vault executes state updates in two distinct phases:</p><p>1. **Pipeline computation** — Determines what the next state should be. All interceptor evaluation, resolve execution, operator/filter/reducer processing, and error normalization happens here. No state is mutated during this phase.</p><p>2. **State commitment** — Makes the result visible. Signal updates, state callbacks, DevTools notifications, and controller notifications all occur inside a `queueMicrotask` after computation completes.</p><p>These phases are intentionally separated and never interleaved. No mutation, signal emission, or observer notification occurs until pipeline computation has completed successfully. Partial results and intermediate values are never observable outside the pipeline.</p><p>### Atomic Snapshots</p><p>Every successful pipeline execution produces exactly one atomic snapshot. That snapshot is:</p><p>- Fully resolved<br>- Fully filtered<br>- Fully reduced<br>- Fully normalized<br>- Fully encrypted and persisted (if applicable)</p><p>Observers never see intermediate states, partially reduced values, or pre-normalized data. Either the entire snapshot is committed, or no state change is visible at all.</p><p>### Reentrancy Is Structurally Impossible</p><p>Because state commitment is deferred to a microtask, any attempt to trigger a new state update from within a reducer, state callback, or error handler will always occur _after_ the current commit has completed.</p><p>This eliminates entire classes of bugs:</p><p>- Dispatching during reducer execution<br>- Promise resolution interleaving with state writes<br>- Observer-triggered infinite loops</p><p>These aren’t prevented by convention or lint rules. They’re prevented by architecture.</p><p>## Why This Matters: Before vs. After</p><p>### Before (Traditional State Management)</p><p>In a typical Redux-style system, a state update triggers middleware, reducers, and effects — often in unpredictable order. Side effects fire during reduction. Observers see partial state. Race conditions emerge when async actions resolve out of order.</p><p>Debugging means tracing through action dispatches, middleware chains, effect handlers, and selector memoization — with no guarantee that what you see in DevTools represents what actually happened.</p><p>### After (SDuX Vault Pipeline)</p><p>A state update enters the pipeline. It passes through declared stages in deterministic order. Every Behavior has a fixed position. Controllers enforce policy before data processing begins. Computation finishes completely before any observer is notified.</p><p>Debugging means looking at one pipeline execution: input in, snapshot out, every stage visible in DevTools with timing and category markers.</p><p>The difference isn’t incremental. When your state system guarantees atomic, deterministic, reentrant-safe execution by construction, entire categories of bugs simply cannot exist.</p><p>## Try It Yourself</p><p>Open a live StackBlitz demo to see the pipeline in action — trigger state updates and watch each stage execute in real time:</p><p>[Open a StackBlitz demo →](<a href="https://www.sdux-vault.com/docs/stackblitz">https://www.sdux-vault.com/docs/stackblitz</a>)</p><p>For the full pipeline stage reference, see the [Pipeline Architecture](<a href="https://www.sdux-vault.com/docs/pipeline/behaviors/complete-pipeline-spec">https://www.sdux-vault.com/docs/pipeline/behaviors/complete-pipeline-spec</a>) documentation. To understand how Behaviors and Controllers compose, start with [What Is a Behavior?](<a href="https://www.sdux-vault.com/docs/pipeline/behaviors/what-is-a-behavior">https://www.sdux-vault.com/docs/pipeline/behaviors/what-is-a-behavior</a>) and [What Is a Controller?](<a href="https://www.sdux-vault.com/docs/pipeline/controllers/what-is-a-controller">https://www.sdux-vault.com/docs/pipeline/controllers/what-is-a-controller</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c758a3e42e83" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>