Skip to content

Commit d28036b

Browse files
committed
Merge pull request #2357 from goldensunliu/patch-1
Update React.render to ReactDOM.render for 1.0
2 parents 2045af8 + 4b06c58 commit d28036b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

UPGRADE_GUIDE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ But for now, here's how to translate the old API to the new one.
2121
```js
2222
// v0.13.x
2323
Router.run(routes, (Handler) => {
24-
React.render(<Handler/>, el);
24+
render(<Handler/>, el);
2525
})
2626

2727
// v1.0
28-
React.render(<Router>{routes}</Router>, el)
28+
render(<Router>{routes}</Router>, el)
2929

3030
// looks more like this:
31-
React.render((
31+
render((
3232
<Router>
3333
<Route path="/" component={App}/>
3434
</Router>
3535
), el);
3636

3737
// or if you'd rather
38-
React.render(<Router routes={routes}/>, el)
38+
render(<Router routes={routes}/>, el)
3939
```
4040

4141
### Locations
@@ -46,13 +46,13 @@ them from the [`history` package](https://github.com/rackt/history), not react r
4646
```js
4747
// v0.13.x
4848
Router.run(routes, Router.BrowserHistory, (Handler) => {
49-
React.render(<Handler/>, el);
49+
render(<Handler/>, el);
5050
})
5151

5252
// v1.0
5353
import createBrowserHistory from 'history/lib/createBrowserHistory'
5454
let history = createBrowserHistory()
55-
React.render(<Router history={history}>{routes}</Router>, el)
55+
render(<Router history={history}>{routes}</Router>, el)
5656
```
5757

5858
If you do not specify a history type (as in the example above) then you will notice some unusual behaviour after updating to 1.0.0. With the default hash based routing a querystring entry not defined by yourself will start appearing in your URLs called "_k". An example of how it looks is this: `?_k=umhx1s`.

0 commit comments

Comments
 (0)