rackt/react-router — pull request #477 by gaearon (2014-11-17 23:42:15+00:00)
Title: [changed] Skip scroll update if only query has changed

This is supposed to fix #432, #439.

@mjackson @rpflorence what do you think?

-----------------

Previously, the only way to out of scroll updates for a route would be by using `ignoreScrollBehavior`.
This, however, made it hard to implement arguably the most common use case: resetting scroll when `params` change and preserving it when only `query` changes.

This commit completely disables scroll updates when only `query` has changed.
This provides a reasonable default behavior and leaves `ignoreScrollBehavior` for more complicated cases.

If you'd rather keep the old behavior and reset scroll on query changes, you can either promote `query` variables to be route `params` or reset scroll position yourself in response to `query` changes in route handler's `componentDidUpdate`.