Skip to content

Commit e7ab6f7

Browse files
committed
Add pathname to docs
1 parent b9079c9 commit e7ab6f7

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

docs/api/mixins/State.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ use this.
88
Instance Methods
99
----------------
1010

11+
### `getPath()`
12+
13+
Returns the current URL path, including query string.
14+
15+
### `getPathname()`
16+
17+
Returns the current URL path without the query string.
18+
1119
### `getParams()`
1220

1321
Returns a hash of the currently active URL params.
@@ -21,13 +29,9 @@ Returns a hash of the currently active query params.
2129
Returns `true` if a route, params, and query are active, `false`
2230
otherwise.
2331

24-
### `getPath()`
25-
26-
Returns the current path.
27-
2832
### `getRoutes()`
2933

30-
Returns the active route tree.
34+
Returns an array of the currently active routes, in nesting order.
3135

3236
Examples
3337
--------

docs/api/run.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,17 @@ for you to render.
5555

5656
An object containing the matched state.
5757

58-
##### `state.routes`
58+
#### `state.path`
5959

60-
An array of the matched [routes][1]. Very useful for fetching data before
61-
rendering.
60+
The current URL path with query string.
6261

63-
See also: [Route][1].
62+
#### `state.action`
63+
64+
The action that lead to the route change.
65+
66+
#### `state.pathname`
67+
68+
The current URL path without the query string.
6469

6570
##### `state.params`
6671

@@ -70,13 +75,12 @@ The active params in the location match.
7075

7176
The active query in the location match.
7277

73-
#### `state.path`
74-
75-
The path matched.
78+
##### `state.routes`
7679

77-
#### `state.action`
80+
An array of the matched [routes][1]. Very useful for fetching data before
81+
rendering.
7882

79-
The action that lead to the route change.
83+
See also: [Route][1].
8084

8185
Examples
8286
--------

0 commit comments

Comments
 (0)