Skip to content

Commit

Permalink
Merge pull request #24 from sectsect/feature/reamdme
Browse files Browse the repository at this point in the history
docs: update README.md
  • Loading branch information
sectsect authored Sep 19, 2024
2 parents b454167 + 7aa051c commit 0dd939e
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 0dd939e

Please sign in to comment.