Skip to content

Commit

Permalink
fix: use "primitive" instead of "hook" (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiyoMoon authored Jan 8, 2025
1 parent 3f4e6d7 commit 88422ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/solid-router/concepts/dynamic-routes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ render(

The colon (`:`) indicates that `id` can be any string.
Once a URL matches the pattern, the `User` component will be shown.
When using dynamic segments, the values can be accessed via the [`useParams`](/solid-router/reference/primitives/use-params) hook within the component.
When using dynamic segments, the values can be accessed via the [`useParams`](/solid-router/reference/primitives/use-params) primitive within the component.

<Callout title="Note on Animation/Transitions">
Routes that share the same path match will be treated as the same route.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ For example, `/users/1` and `/users/2` are both valid routes and rather than def
|-- [id].tsx
```

For example, using `solid-router`, you could use the [`useParams`](/solid-router/reference/primitives/use-params) hook to match the dynamic segment:
For example, using `solid-router`, you could use the [`useParams`](/solid-router/reference/primitives/use-params) primitive to match the dynamic segment:

```tsx title="routes/users/[id].tsx"
import { useParams } from "@solidjs/router";
Expand Down

0 comments on commit 88422ad

Please sign in to comment.