variable / @typed/navigation/memory

initialMemory

Provides Navigation from one URL with generated entry identity.

Package version
1.0.0-beta.13
Category
Memory history providers
Since
1.0.0

Import

import { initialMemory } from "@typed/navigation/memory";

Signatures

export declare const initialMemory: (options: InitialMemoryOptions) => Layer.Layer<Navigation, NavigationError, Uuid7State>;

Why

It is the concise SSR/test provider when no prior history snapshot exists, while preserving the same identity and transition semantics as {@link memory}.

Ownership and lifetime

Layer acquisition uses Uuid7State to create the initial key and id, then delegates state ownership to memory. The Navigation service and subscriptions live until the Layer Scope closes.

Examples

import { initialMemory } from "@typed/navigation/memory"

const NavigationLive = initialMemory({ url: "/products?page=2", maxEntries: 50 })

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source