diff --git a/README.md b/README.md index ab74790d..25f84a71 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,32 @@ render( ) ``` +`` accepts an optional `path` prop so you can choose to apply the active class for any arbitrary URL pattern that does not exactly match the link's `href` prop. This is excellent for nested navigation. + +```js +import { Router } from 'preact-router'; +import { Link } from 'preact-router/match'; + +render( +
+ + +
+ This is the Foo route. + Bar + Biz + Baz + +
This is the Foo Bar route.
+
This is the Foo Biz route.
+
This is the Foo Baz route.
+
+
+
+) +``` ### Default Link Behavior