mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-25 22:37:18 +10:00
Don't use componentWillReceiveProps in Routes
This commit is contained in:
parent
5f7ffd737f
commit
c4bae634ec
1 changed files with 3 additions and 3 deletions
|
|
@ -78,12 +78,12 @@ class RouteComponentRenderer extends Component {
|
|||
handleLocationChanged(this.props.dispatch, this.props.location);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
componentDidUpdate() {
|
||||
// Calling loadData after initial rendering (on client side).
|
||||
// This makes it possible to use loadData as default client side data loading technique.
|
||||
// However it is better to fetch data before location change to avoid "Loading data" state.
|
||||
callLoadData(nextProps);
|
||||
handleLocationChanged(nextProps.dispatch, nextProps.location);
|
||||
callLoadData(this.props);
|
||||
handleLocationChanged(this.props.dispatch, this.props.location);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue