Skip to content

Commit

Permalink
chore: updated param of generate-path so its a string instead of int (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MenouerBetty committed Jun 23, 2022
1 parent 1b636aa commit 005088c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -67,3 +67,4 @@
- vijaypushkin
- vikingviolinist
- xcsnowcity
- MenouerBetty
2 changes: 1 addition & 1 deletion docs/utils/generate-path.md
Expand Up @@ -19,7 +19,7 @@ declare function generatePath(
`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.

```tsx
generatePath("/users/:id", { id: 42 }); // "/users/42"
generatePath("/users/:id", { id: "42" }); // "/users/42"
generatePath("/files/:type/*", {
type: "img",
"*": "cat.jpg",
Expand Down

0 comments on commit 005088c

Please sign in to comment.