Skip to content

Commit 3a0bd60

Browse files
committed
update isActive API docs
1 parent e7c6f3d commit 3a0bd60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/API.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,12 +523,13 @@ Stringifies the query into the pathname, using the router's config.
523523
##### `createHref(pathname, query)`
524524
Creates a URL, using the router's config. For example, it will add `#/` in front of the `pathname` for hash history.
525525

526-
##### `isActive(pathname, query)`
526+
##### `isActive(pathname, query, indexOnly)`
527527
Returns `true` or `false` depending on if the current path is active. Will be true for every route in the route branch matched by the `pathname` (child route is active, therefore parent is too).
528528

529529
###### arguments
530530
- `pathname` - the full URL with or without the query.
531531
- `query` - an object that will be stringified by the router.
532+
- `indexOnly` - a boolean (default: `false`).
532533

533534
#### Examples
534535
```js

0 commit comments

Comments
 (0)