Skip to content

Commit 005088c

Browse files
authored
chore: updated param of generate-path so its a string instead of int (#9008)
1 parent 1b636aa commit 005088c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@
6767
- vijaypushkin
6868
- vikingviolinist
6969
- xcsnowcity
70+
- MenouerBetty

docs/utils/generate-path.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare function generatePath(
1919
`generatePath` interpolates a set of params into a route path string with `:id` and `*` placeholders. This can be useful when you want to eliminate placeholders from a route path so it matches statically instead of using a dynamic parameter.
2020

2121
```tsx
22-
generatePath("/users/:id", { id: 42 }); // "/users/42"
22+
generatePath("/users/:id", { id: "42" }); // "/users/42"
2323
generatePath("/files/:type/*", {
2424
type: "img",
2525
"*": "cat.jpg",

0 commit comments

Comments
 (0)