variable / @typed/navigation/Navigation

CurrentPath

Reactively exposes the current pathname and search string, excluding origin and hash.

Package version
1.0.0-beta.7
Category
Current destination
Since
1.0.0

Import

import { CurrentPath } from "@typed/navigation/Navigation";

Signatures

export declare const CurrentPath: RefSubject.Computed<string, never, Navigation>;

Why

Router matching needs a stable backend-neutral location source while leaving browser-only URL details to the provider.

Ownership and lifetime

This computed RefSubject acquires no independent listener. It borrows the active Navigation service and lives for the consuming Effect’s subscription.

Examples

import { CurrentPath } from "@typed/navigation/Navigation"
import * as Effect from "effect/Effect"

const readPath = Effect.map(CurrentPath, (path) => path)

Other public imports

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

Source