Skip to content

Commit 6cc67e5

Browse files
docs: Update path-params.md (#5481)
1 parent 4062d45 commit 6cc67e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/router/framework/react/guide/path-params.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@ function FileComponent() {
187187
You can combine both prefixes and suffixes to create very specific routing patterns. For example, if you want to match a URL that starts with `user-` and ends with `.json`, you can define it like this:
188188

189189
```tsx
190-
// src/routes/users/user-{$userId}person
191-
export const Route = createFileRoute('/users/user-{$userId}person')({
190+
// src/routes/users/user-{$userId}.json
191+
export const Route = createFileRoute('/users/user-{$userId}.json')({
192192
component: UserComponent,
193193
})
194194

195195
function UserComponent() {
196196
const { userId } = Route.useParams()
197-
// userId will be the value between 'user-' and 'person'
197+
// userId will be the value between 'user-' and '.json'
198198
return <div>User ID: {userId}</div>
199199
}
200200
```

0 commit comments

Comments
 (0)