Skip to content

Commit 63bdab2

Browse files
committed
Merge pull request #48 from spicyj/patch-1
Explain how route nesting works with an example
2 parents 6b2a1b2 + bc45b6d commit 63bdab2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ way down the view hierarchy. This allows you to create nested layouts
6565
without having to wire it all up yourself. `Link` components create
6666
accessible anchor tags to route you around the application.
6767

68+
As an example, if the current path is `/user/17`, the following
69+
component will be rendered:
70+
71+
```js
72+
<App activeRoute={
73+
<Users activeRoute={<User params={{userId: 17}} />} />
74+
} />
75+
```
76+
77+
Each component will also receive a `query` prop equal to a dictionary
78+
of the current query params.
79+
6880
Here's the rest of the application:
6981

7082
```js

0 commit comments

Comments
 (0)