Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/dynamic_routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class State(rx.State):
def user_post(self) -> str:
args = self.router.page.params
usernames = args.get('username', [])
return f'Posts by \{', '.join(usernames)}'
return f"Posts by \{', '.join(usernames)}"

@rx.page(route='/users/[id]/posts/[...username]')
def post():
Expand All @@ -87,7 +87,7 @@ app = rx.App()
```

In this case, the `...username` catch-all pattern captures any number of segments after
`/users/`, allowing URLs like `/users/2/john/` and `/users/1/john/doe/` to match the route.
`/users/`, allowing URLs like `/users/2/posts/john/` and `/users/1/posts/john/doe/` to match the route.

## Optional Catch-All Routes

Expand Down
Loading