score:4

Accepted answer

componentDidUpdate() can be leveraged to compare current and previous query strings in order to detect changes in location for instances where components are not dismounted.

// Did Update.
componentDidUpdate(previousProps) {
  const currentSearch = this.props.location.search
  const previousSearch = previousProps.location.search
  if (currentSearch !== previousSearch) updateDesigner()
}

Related Query

More Query from same tag