Skip to content

Commit 160c5ba

Browse files
committed
[fixed] Removed <Link> warning about no history in context
Fixes remix-run#2051
1 parent 111caf9 commit 160c5ba

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

modules/Link.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ class Link extends React.Component {
7777
this.context.history.pushState(this.props.state, this.props.to, this.props.query)
7878
}
7979

80-
componentWillMount() {
81-
warning(
82-
this.context.history,
83-
'A <Link> should not be rendered outside the context of history ' +
84-
'some features including real hrefs, active styling, and navigation ' +
85-
'will not function correctly'
86-
)
87-
}
88-
8980
render() {
9081
const { history } = this.context
9182
const { activeClassName, activeStyle, onlyActiveOnIndex, to, query, state, onClick, ...props } = this.props

0 commit comments

Comments
 (0)