'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'
'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'
...
@@ -142,7 +143,7 @@ class LiveRoute extends React.Component<IProps, any> {
...
@@ -142,7 +143,7 @@ class LiveRoute extends React.Component<IProps, any> {
}
}
// get route of DOM
// get route of DOM
componentDidUpdate(prevProps,prevState){
publiccomponentDidUpdate(prevProps,prevState){
if(!this.doesRouteEnableLive()){
if(!this.doesRouteEnableLive()){
return
return
}
}
...
@@ -162,11 +163,11 @@ class LiveRoute extends React.Component<IProps, any> {
...
@@ -162,11 +163,11 @@ class LiveRoute extends React.Component<IProps, any> {
}
}
// clear on unmounting
// clear on unmounting
componentWillUnmount(){
publiccomponentWillUnmount(){
this.clearScroll()
this.clearScroll()
}
}
doesRouteEnableLive(){
publicdoesRouteEnableLive(){
returnthis.props.livePath||this.props.alwaysLive
returnthis.props.livePath||this.props.alwaysLive
}
}
...
@@ -183,7 +184,7 @@ class LiveRoute extends React.Component<IProps, any> {
...
@@ -183,7 +184,7 @@ class LiveRoute extends React.Component<IProps, any> {
* @memberof Route
* @memberof Route
* Back up current router every time it is rendered normally, backing up to the next livePath rendering
* Back up current router every time it is rendered normally, backing up to the next livePath rendering