url-tabs

Enforce URL-based tab state management in React with useSearchParams.

1|1|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/orkestra-cc/orkestra --skill url-tabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: url-tabs
Source: https://github.com/orkestra-cc/orkestra/tree/main/.claude/skills/url-tabs
Command: npx skills add https://github.com/orkestra-cc/orkestra --skill url-tabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the issue of lost UI state when refreshing pages or sharing links, ensuring that specific tab selections are preserved and bookmarkable.

Core Features & Use Cases

  • URL Synchronization: Automatically maps active tab states to browser search parameters using React Router.
  • History Management: Implements clean history navigation by replacing state entries instead of pushing new ones.
  • Use Case: When building a dashboard with multiple views, use this pattern to ensure that a user sharing a link to the Settings tab actually lands on the Settings tab, rather than the default view.

Quick Start

Apply the url-tabs pattern to the current React component by replacing local useState hooks with useSearchParams and implementing the required tab selection handler.

Frequently Asked Questions about url-tabs

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

FAQPage Schema
How do I sync React tab states with URL parameters?

To sync React tab states with URL parameters, implement the useSearchParams hook from react-router-dom, mapping your active tab values directly to browser search parameters to ensure UI persistence and shareable deep-linking.

Why does my React component lose its active tab state on page refresh?

Your active tab state is lost on refresh because it is stored locally via useState rather than in the URL. Storing tab states in URL search parameters ensures specific tab selections are preserved and bookmarkable across refreshes.

How do I maintain clean browser history when routing tabs in React?

To maintain clean browser history when routing tabs in React, implement useSearchParams with the replace: true option. This replaces state entries during navigation instead of pushing new ones, preventing history clutter.

Does this URL state management approach work without react-router-dom?

No, this URL state management approach targets components using react-router-dom. It requires the implementation of the useSearchParams hook to enforce URL-based state synchronization for tabbed interfaces.

What is the best way to share deep links to specific dashboard views in React?

The best way to share deep links to specific dashboard views is URL synchronization. Mapping active tab states to browser search parameters ensures users sharing a link land directly on the specified tab rather than the default view.

How do I replace local useState hooks for React tab management?

To replace local useState hooks for React tab management, apply the url-tabs pattern by swapping useState with useSearchParams and implementing the required tab selection handler to drive state directly from the URL.