Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sectsect committed Aug 30, 2024
1 parent d2b6742 commit 7aa051c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pnpm add @sect/use-placeholder-path

## Usage

```typescript
```tsx
'use client';

import usePlaceholderPath from '@sect/use-placeholder-path';
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7aa051c

Please sign in to comment.