Skip to content

Commit b2d7212

Browse files
klequisatilafassina
authored andcommitted
Update routing.mdx
1 parent 6bc55f0 commit b2d7212

File tree

1 file changed

+3
-3
lines changed
  • src/routes/solid-start/building-your-application

1 file changed

+3
-3
lines changed

src/routes/solid-start/building-your-application/routing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ They are defined using square brackets with `...` before the label for the route
177177
|-- [...post].tsx
178178
```
179179

180-
The value of the catch-all route will be an array of strings, where each string is a segment of the URL path that matched the catch-all route.
181-
For example, with the route `[...post]`, the value of `post` will be a property on the `params` object that is returned by the `useParams` hook.
182-
It will be a string with the value of the dynamic segment.
180+
A catch-all route will have one parameter which is a forward-slash delimited string of all the URL segments after the last valid segment.
181+
For example, with the route `[..post]` and a URL path of `/post/foo` the `params` object returned from the `useParams` primitive will have a `post` property with the value of `foo`.
182+
For a URL path of `/post/foo/baz` it will be `foo/baz`.
183183

184184
```tsx title="routes/blog/[...post].tsx"
185185
import { useParams } from "@solidjs/router";

0 commit comments

Comments
 (0)