Skip to content

Commit 7d875b9

Browse files
committed
document full path signatures
closes #82
1 parent 9dac9a6 commit 7d875b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ change the path of your route, you don't have to change your links.
304304

305305
#### Properties
306306

307-
**to** - The name of the route to link to.
307+
**to** - The name of the route to link to, or a full URL.
308308

309309
**query** - Object, Query parameters to add to the link. Access query
310310
parameters in your route handler with `this.props.query`.
@@ -322,6 +322,9 @@ Given a route like `<Route name="user" path="/users/:userId"/>`:
322322
active -->
323323
<a href="/users/123?foo=bar" class="active">Michael</a>
324324
<a href="#/users/123?foo=bar">Michael</a>
325+
326+
<!-- or if you have the full url already, you can just pass that in -->
327+
<Link to="/users/123?foo=bar"/>
325328
```
326329

327330

@@ -333,18 +336,20 @@ The router has several top-level methods that may be used to navigate around the
333336
var Router = require('react-nested-router')
334337
```
335338

336-
**transitionTo(routeName, [params[, query]])** - Programatically transition to a new route.
339+
**transitionTo(routeNameOrPath, [params[, query]])** - Programatically transition to a new route.
337340

338341
```js
339342
Router.transitionTo('user', {id: 10}, {showAge: true});
340343
Router.transitionTo('about');
344+
Router.transitionTo('/users/10?showAge=true');
341345
```
342346

343347
**replaceWith(routeName, [params[, query]])** - Programatically replace current route with a new route. Does not add an entry into the browser history.
344348

345349
```js
346350
Router.replaceWith('user', {id: 10}, {showAge: true});
347351
Router.replaceWith('about');
352+
Router.replaceWith('/users/10?showAge=true');
348353
```
349354

350355
**goBack()** - Programatically go back to the last route and remove the most recent entry from the browser history.

0 commit comments

Comments
 (0)