Skip to content

Commit 034a6d3

Browse files
committed
Merge pull request #2433 from insin/patch-2
Add an "Importing" section to the upgrade guide
2 parents b57580e + 4f873b0 commit 034a6d3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

UPGRADE_GUIDE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ integration with libs like redux and relay, and lots more.
1616

1717
But for now, here's how to translate the old API to the new one.
1818

19+
### Importing
20+
21+
The new `Router` component is a property of the top-level module.
22+
23+
```js
24+
// v0.13.x
25+
var Router = require('react-router');
26+
var Route = Router.Route;
27+
28+
// v1.0
29+
var ReactRouter = require('react-router');
30+
var Router = ReactRouter.Router;
31+
var Route = ReactRouter.Route;
32+
33+
// or using object destructuring
34+
var { Router, Route } = require('react-router');
35+
```
36+
1937
### Rendering
2038

2139
```js

0 commit comments

Comments
 (0)