parallel

Define parallel routes rendering multiple named slots simultaneously in @rangojs/router layouts.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/rangojs/rango --skill parallel-rangojs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: parallel
Source: https://github.com/rangojs/rango/tree/main/packages/rangojs-router/skills/parallel
Command: npx skills add https://github.com/rangojs/rango --skill parallel-rangojs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @rangojs/router.

What problem does it solve? Building layouts with multiple independently-loading regions—like a sidebar, notification panel, and main content at the same URL—requires coordinating separate data loading, streaming, and revalidation per region. This Skill shows how to declare parallel route slots in @rangojs/router so each region renders, loads, and revalidates independently. ## Core Features & Use Cases - Named parallel slots: Render multiple components simultaneously via parallel() and <ParallelOutlet name="@slot" />, with last-definition-wins override semantics for composition. - Independent streaming and loaders: Attach loader() and loading() per slot so slow regions stream in without blocking the rest of the page. - Scoped revalidation and context: Control when slots refresh with revalidate() contracts, read parent handler data via ctx.get(), and push metadata through UI-less @meta slots. - Use Case: Build a shop layout where a promo banner, category sidebar, cart preview, and notification panel each load their own data and revalidate only when relevant actions occur, while the main outlet renders the current route. ## Quick Start Ask the AI to add a parallel route with a @sidebar slot and its own loader and skeleton to a layout in your @rangojs/router route tree.

Frequently Asked Questions about parallel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create parallel routes in @rangojs/router?

Call parallel() inside a layout or path with an object mapping slot names to handlers, then render each slot with <ParallelOutlet name="@slot" /> in the layout component. Each slot renders alongside the main <Outlet /> content at the same URL.

How do parallel route loaders and streaming work in React Server Components?

A parallel slot with loading() becomes an independent streaming unit: its skeleton renders immediately while its loader resolves in the background. Without loading(), the slot's loaders block the parent layout's rendering until data is ready.

When should I use parallel routes vs intercept routes?

Use parallel() when slots always render alongside the page, such as sidebars or dashboards. Use intercept() for modals or slide-overs that appear only on soft navigation but show a full page on hard navigation.

Why does my parallel slot not revalidate after a server action?

Slots under a standalone layout are skipped on actions by default; add a revalidate() callback such as ctx.isAction(CartActions) to opt in. Slots under a path() revalidate together with their route entry automatically.

Can a parallel slot read data set by its parent route handler?

Yes, slots read parent handler or layout data via ctx.get() because handlers execute before their parallels. Layout-level parallels see layout data only, while parallels inside a path see both layout and path handler data.

What are the limitations of handler.use in parallel slots?

Parallel slots accept only revalidate, loader, loading, errorBoundary, notFoundBoundary, and transition via handler.use; middleware and layout are not allowed. Slot-level transition does not apply a ViewTransition wrapper at render time.