Skip to content

Commit 30635bf

Browse files
committed
document how to get segment
1 parent 301b8dd commit 30635bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

documentation/docs/80-migrating.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ You access them differently in SvelteKit. `stores` is now `getStores`, but in mo
116116

117117
Regex routes are no longer supported. Instead, use [advanced route matching](/docs/routing#advanced-routing-matching).
118118

119+
#### Segments
120+
121+
Previously, layout components received a `segment` prop indicating the child segment. This has been removed; you should use the more flexible `$page.url.pathname` value to derive the segment you're interested in.
122+
119123
#### URLs
120124

121125
In Sapper, all relative URLs were resolved against the base URL — usually `/`, unless the `basepath` option was used — rather than against the current page.

0 commit comments

Comments
 (0)