Skip to content

Commit 93bf4b2

Browse files
committed
adding links to upgrade guides in deprecations
1 parent bf69559 commit 93bf4b2

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

modules/History.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const History = {
1111
},
1212

1313
componentWillMount() {
14-
warning(false, 'the `History` mixin is deprecated, please access `context.router` with your own `contextTypes` or see https://github.com/rackt/react-router/blob/v1.1.0/CHANGES.md#v110 for more options')
14+
warning(false, 'the `History` mixin is deprecated, please access `context.router` with your own `contextTypes`. http://bit.ly/1QZCLCv')
1515
this.history = this.context.history
1616
}
1717

modules/Lifecycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const Lifecycle = {
3535
},
3636

3737
componentDidMount() {
38-
warning(false, 'the `Lifecycle` mixin is deprecated, please use `this.props.router.setRouteLeaveHook(this.props.route, hook)` from a route component, see https://github.com/rackt/react-router/blob/v1.1.0/CHANGES.md#v110 for more details.')
38+
warning(false, 'the `Lifecycle` mixin is deprecated, please use `context.router.setRouteLeaveHook(route, hook)`, see http://bit.ly/1PxKMv7 for more details.')
3939
invariant(
4040
this.routerWillLeave,
4141
'The Lifecycle mixin requires you to define a routerWillLeave method'

modules/Link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const Link = React.createClass({
106106
const { to, query, hash, state, activeClassName, activeStyle, onlyActiveOnIndex, ...props } = this.props
107107
warning(
108108
!(query || hash || state),
109-
'the `query`, `hash`, and `state` props on `<Link>` are deprecated; use a location descriptor instead'
109+
'the `query`, `hash`, and `state` props on `<Link>` are deprecated, use `<Link to={{ pathname, query, hash, state }}/>, see http://bit.ly/1VpTo9H.'
110110
)
111111

112112
// Ignore if rendered outside the context of router, simplifies unit testing.

modules/RouteContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const RouteContext = {
2626
},
2727

2828
componentWillMount() {
29-
warning(false, 'the `RouteContext` mixin is deprecated, please export `this.props.route` from a route component yourself. See https://github.com/rackt/react-router/blob/v1.1.0/CHANGES.md#v110 for more details.')
29+
warning(false, 'The `RouteContext` mixin is deprecated. You can provide `this.props.route` on context with your own `contextTypes`. See http://bit.ly/1MHiOst')
3030
}
3131

3232
}

modules/RouterContext.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const RouterContext = React.createClass({
6060
},
6161

6262
render() {
63-
const { router, history, location, routes, params, components } = this.props
63+
const { history, location, routes, params, components } = this.props
6464
let element = null
6565

6666
if (components) {
@@ -71,7 +71,6 @@ const RouterContext = React.createClass({
7171
const route = routes[index]
7272
const routeParams = getRouteParams(route, params)
7373
const props = {
74-
router,
7574
history,
7675
location,
7776
params,

modules/createTransitionManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function createTransitionManager(history, routes) {
2929
) {
3030
warning(
3131
false,
32-
'`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead'
32+
'`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead: http://bit.ly/1VpTo9H'
3333
)
3434
location = { pathname: location, query: indexOnlyOrDeprecatedQuery }
3535
indexOnly = deprecatedIndexOnly || false

0 commit comments

Comments
 (0)