Skip to content

History / React Integration

Revisions

  • docs: add Scroll Spy page + cross-link across hash, scroll-restoration, 6 adapters (#575) NEW Scroll-Spy.md — flagship page (~350 lines) symmetric with Scroll-Restoration.md and View-Transitions.md: * Why not a plugin (DOM-agnostic core, IntersectionObserver = DOM) * Opt-in syntax for all 5 web adapters + Angular DI * Options table (selector / rootMargin / scrollContainer) + hardcoded internals (threshold, debounce, cooldown) * Behavior matrix per event (user scroll, Link hash click, F5, stale hash, same-hash skip, self-emit guard) * Anti-flicker architecture deep-dive (isTransitioning + coolingDown + selfEmitting; scrollend Baseline 2026; 500ms fallback timeout) * Plugin compatibility (browser/navigation full; hash/memory/no-URL warn-once + NOOP) * Self-healing on init for stale hashes (/page#nonexistent) * Filtering hash-only transitions idiom (RFC §13 user-land filter pattern + pipeline cost table) * Three recipes (Custom IO alongside spy, Per-route config, TOC sidebar in ~30 LOC) * 8 edge cases / known limitations * Comparison table with Link hash and Scroll-Restoration anchor scrolling UPDATED Hash.md — expanded "Comparison: Hash Features" into a 3-column table (Link hash / anchorScrolling / createScrollSpy) + new "Filtering Hash-only Transitions" section documenting the user-land filter that applies to all three sources of hashChanged: true (clicks, popstate, spy emits). Lists which pipeline phases fire on hash-only transitions (subscribe yes, onStay/onNavigate yes, guards no, onLeave/onEnter no). UPDATED Scroll-Restoration.md — added scroll-spy emit row to the "Behaviour change under browser-plugin" matrix (replace: true → skip, no magnetic snap) + cross-link in See Also. Foundation #648 closure now applies to spy emits. UPDATED RouterProvider.md — added scrollSpy row to the props table + full subsection between scrollRestoration and viewTransitions (options table, per-framework code, plugin compatibility note). UPDATED 6 adapter integration pages (React, Preact, Solid, Vue, Svelte, Angular) — scrollSpy mention in the Components table + per- framework code block with reactivity notes specific to that adapter (React/Preact useEffect with primitive deps, Solid dedicated onMount block, Vue watchToggleableUtility now four utilities, Svelte $effect + $derived + untrack, Angular bootstrap-time snapshot via provideEnvironmentInitializer + installScrollSpy). UPDATED Navigation-Plugin.md — expanded "Router-driven mutations re- enter the navigate handler" edge case to document the event.intercept({ scroll: "manual" }) override that closes the scroll-spy + slow user scroll viewport-jump bug. Cross-links to Hash, Scroll-Restoration, and Scroll-Spy in See Also. UPDATED Home.md — added Scroll Spy bullet alongside Scroll Restoration in the concept overview. UPDATED Ink-Integration.md — added scrollSpy row to the "feature unavailable in terminal" table (symmetric with scrollRestoration: DOM-only, no terminal equivalent). UPDATED recipes.md — added companion blockquote in Scroll Restoration section pointing to Scroll Spy for the opposite direction (scroll → URL) with TOC sidebar pattern hint. UPDATED _Sidebar.md — added Scroll Spy link in DOM Utilities section (alphabetically between Scroll Restoration and View Transitions). Closes destination-404 gap: README/CLAUDE/IMPLEMENTATION_NOTES across 17 files in the main monorepo already link to wiki/Scroll-Spy. UPDATED Link.md — retargeted link-hash example URL to its new location in hash-examples/ subgroup (aligns with PR #695 commit chore(react): move link-hash + scroll-restoration into hash-examples). Total: 1 new flagship page + 15 cross-linked updates. Companion to real-router monorepo PR #695 — scroll-spy implementation, examples, docs, and adapter wiring. Refs greydragon888/real-router#575

    @greydragon888 greydragon888 committed Jun 2, 2026
  • docs(integrations): sync adapter guides with SSR-feature surface - React/Preact/Solid/Vue/Svelte/Angular: align imports and API tables with the /ssr subpath (ClientOnly, ServerOnly, Await, Streamed, useDeferred, HttpStatusCode, HttpStatusProvider, createHttpStatusSink) - Tighten typing (Params from @real-router/core), expose RouterContextValue re-exports, clarify framework-specific gotchas

    @greydragon888 greydragon888 committed May 18, 2026
  • docs: defer() formal API + /ssr subpath docs across 8 pages Updates the wiki to reflect the defer() + /ssr work shipped in the main repo's #609 / #610 / #611 branch. Streaming-SSR.md (large rewrite): - Opening removes "Real-Router has no streaming-specific API" — Real- Router now ships defer() + injectDeferredScripts as a formal cross- adapter wire-format. - Loader example replaced: defer({ critical, deferred }) instead of the old "split data manually between loader and component" pattern. - Reviews component example uses <Await name> + <Streamed> from @real-router/react/ssr (with the equivalent inline use(useDeferred(...)) form alongside). - Server entry shows injectDeferredScripts + getDeferBootstrapScript + serializeRouterState({ excludeContext: ["ssrDataDeferred"] }). - Express integration adds <!--defer-bootstrap--> placeholder splice. - Comparison with RR7 reframed: now parity (Real-Router has defer()), with notes on the open framework-agnostic wire format vs RR7's turbo-stream-internal one + cross-adapter support matrix. ssr-data-plugin.md: - New §11 "defer({ critical, deferred }) — critical + streamed split" covering server pipeline (injectDeferredScripts), wire format details (escapeForScript, bootstrap, XSS hardening), per-adapter consumer table, "When NOT to use defer()" matrix (Solid/Vue/Svelte/Angular framework-native rationales). - Teardown section extended to mention all 4 namespace claims (data / ssrDataMode / ssrDataDeferred / ssrDataDeferredKeys). React-Integration.md: - Entry Points: 3 → 5 (added /ssr and /legacy/ssr) plus react-server condition note for Server Components type-only entry. - Decision matrix expanded. Preact-Integration.md: - "Single Entry Point" → "Two Entry Points (main + /ssr)" with note that <Await> implements use(promise) semantics via thenable-throw + .status/.value/.reason tagging. Solid-Integration.md: - Quick Start gains "Two Entry Points: main + /ssr" with note that useDeferred returns Accessor<Promise<T>> + cross-link to Streaming-SSR Solid Counterpart and ssr-data-plugin §11. Vue-Integration.md: - Same two-entry pattern; useDeferred returns Promise<T> for await inside async setup(); <Await v-slot="{ value }"> scoped slot. Svelte-Integration.md: - Same two-entry pattern; useDeferred returns Promise<T> for {#await}; .svelte components <Await>/<Streamed>. Angular-Integration.md: - Two-entry pattern via ng-packagr secondary entry-point at packages/angular/ssr/. - Asymmetric Angular note: no <Await>/<Streamed>; injectDeferred<T>(key) returns Signal<T | undefined>. Stale main-entry imports for SSR-feature symbols verified absent across all wiki pages (grep clean — 0 matches).

    @greydragon888 greydragon888 committed May 9, 2026
  • docs: backfill pending wiki updates for useRoute non-nullable + adapter integrations Catches up wiki content that was edited locally before this branch — separated from #532 docs to keep that commit focused. - {React,Preact,Solid,Vue,Svelte,Angular}-Integration.md, useRoute.md, useRouteNode.md: useRoute() is now non-nullable (#535) — `route?.x` → `route.x`, with note that useRouteNode keeps nullable shape - memory-plugin.md: minor edits picked up alongside the sweep

    @greydragon888 greydragon888 committed Apr 29, 2026
  • docs: actualize wiki for view-transitions / useRouteExit / useRouteEnter / browser direction / isActiveRoute fix Sourced from .changeset files on the feature branch. New pages: - View-Transitions.md — covers `viewTransitions` prop / `provideRealRouter` option, browser-support matrix, CSS customisation (hero morph, direction-aware slides), setTimeout(0) load-bearing detail, Angular-specific applicationRef.tick() workaround, reactivity matrix per adapter, four-recipe comparison. - useRouteExit.md — covers built-in guards (reentrant abort pre-check, same-route skip, latest-handler ref), Promise-blocking semantics, handler-reactivity caveat per non-React adapter, common recipes (animation, autosave, abort, scroll capture, motion library bridge). - useRouteEnter.md — covers skip-initial / skip-same-route / StrictMode immunity, race-safety via post-commit useRoute() snapshot, mount-time context, recipes (analytics, direction-aware entry, focus management, transition metadata). Updated pages: - RouterProvider.md — new `viewTransitions` prop row in props table + per-framework syntax block. - browser-plugin.md — new `direction` field in BrowserContext type + value table + consumer recipes (router.subscribe + useRouteEnter), createDirectionTracker pointer. - isActiveRoute.md — new "Hierarchical Branch — Symmetry Fixes (#536, #537)" section documenting `ignoreQueryParams` symmetry and removal of spurious descendant-of-active matches. - _Sidebar.md — links to useRouteExit, useRouteEnter under Hooks; View Transitions under DOM Utilities. - {React,Preact,Solid,Vue,Svelte,Angular}-Integration.md — added viewTransitions / view-transitions prop docs in Provider section + useRouteExit / useRouteEnter (or injectRouteExit / injectRouteEnter for Angular) rows in Hooks / Composables / Functions tables.

    @greydragon888 greydragon888 committed Apr 27, 2026
  • docs: scroll restoration wiki + React-Integration guide (#497) - New page: Scroll-Restoration — behavior matrix, per-framework opt-in snippets, virtual-scroll recipe, "why not a plugin" rationale. - New page: React-Integration — covers three entry points (main/legacy/ink), <Activity> keepAlive, native useSyncExternalStore, memo'd <Link>. Fills the long-standing gap (Sidebar linked to a missing page). - RouterProvider: props table extended with scrollRestoration, per-framework snippets. - 5 Integration guides (Preact/Solid/Svelte/Vue/Angular) + Ink: scrollRestoration section with framework-specific reactivity notes (Solid non-reactive onMount, Svelte $derived+untrack, Vue reactive watch, Angular bootstrap snapshot). - Home: link under Concepts. - Accessibility: new "Relationship to Scroll Restoration" section — ortho interaction. - recipes: existing home-grown scroll-restore recipe marked as reference; points to the builtin utility. - _Sidebar: Scroll Restoration entry under DOM Utilities.

    @greydragon888 greydragon888 committed Apr 21, 2026