You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/RouteConfiguration.md
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ URL | Components
106
106
107
107
### Decoupling the UI from the URL
108
108
109
-
It would be nice if we could remove the `/inbox` segment from the `/inbox/messages/:id` URL pattern, but still render `Message` nested inside the `App -> Inbox` UI. Absolute `path`s let us do exactly that.
109
+
It would be nice if we could remove the `/inbox` segment from the `/inbox/messages/:id` URL pattern, but still render `Message` nested inside the `App -> Inbox` UI. Pathless routes let us do exactly that.
110
110
111
111
```js
112
112
render((
@@ -125,7 +125,7 @@ render((
125
125
), document.body)
126
126
```
127
127
128
-
The ability to use absolute paths in deeply nested routes gives us complete control over what the URL looks like! We don't have to add more segments to the URL just to get nested UI.
128
+
The ability to use declare routes without paths gives us complete control over what the URL looks like! We don't have to add more segments to the URL just to get nested UI.
129
129
130
130
We can now render the following URLs:
131
131
@@ -136,8 +136,6 @@ URL | Components
136
136
`/inbox` | `App -> Inbox`
137
137
`/messages/:id` | `App -> Inbox -> Message`
138
138
139
-
**Note**: Absolute paths may not be used in route config that is [dynamically loaded](/docs/guides/DynamicRouting.md).
140
-
141
139
### Preserving URLs
142
140
143
141
Wait a minute ... we just changed a URL! [That's not cool](http://www.w3.org/Provider/Style/URI.html). Now everyone who had a link to `/inbox/messages/5` has a **broken link**. :(
@@ -184,7 +182,7 @@ Continuing with our example above, if a user clicked on a link to `/about` from
184
182
185
183
Since [routes](/docs/Glossary.md#route) are usually nested, it's useful to use a concise nested syntax like [JSX](https://facebook.github.io/jsx/) to describe their relationship to one another. However, you may also use an array of plain [route](/docs/Glossary.md#route) objects if you prefer to avoid using JSX.
186
184
187
-
The `<Redirect>` configuration helper is not available when using plain routes, so you have to set up the redirect using the `onEnter` hook.
185
+
The `<Redirect>` configuration helper is not available when using plain routes, so you have to set up the redirect using the `onEnter` hook.
188
186
189
187
The route config we've discussed up to this point could also be specified like this:
0 commit comments