From 7aa051ce10f446b02fe33d3b6ceb035340ae2d43 Mon Sep 17 00:00:00 2001 From: sect Date: Wed, 14 Aug 2024 10:16:10 +0900 Subject: [PATCH] docs: update README.md --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a2419cc..56c35ed 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ pnpm add @sect/use-placeholder-path ## Usage -```typescript +```tsx 'use client'; import usePlaceholderPath from '@sect/use-placeholder-path'; @@ -57,10 +57,14 @@ interface UsePlaceholderPathOptions { ## Examples 1. Route: `/users/123/posts/456` - - Result: `/users/[userId]/posts/[postId]` - -2. Catch-all route: `/blog/2024/08/15` - - Result: `/blog/[...slug]` + - Result: `/users/[userId]/posts/[postId]` +2. Catch-all Segments Route: `/blog/2024/08/15` + - Result: `/blog/[...slug]` +3. Optional Catch-all Segments Route: `/shop/a/b/c` + - Result: `/shop/[[...slug]]` + +> [!NOTE] +> For Top-Level Optional Catch-all Segments, special handling may be required. See the **"Known Issues"** section for more details. ## Notes