{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/810","labels_url":"https://api.github.com/repos/rackt/react-router/issues/810/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/810/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/810/events","html_url":"https://github.com/rackt/react-router/issues/810","id":57215078,"number":810,"title":"Controlling scroll behavior when clicking a <Link>","user":{"login":"MadLittleMods","id":558581,"avatar_url":"https://avatars.githubusercontent.com/u/558581?v=3","gravatar_id":"","url":"https://api.github.com/users/MadLittleMods","html_url":"https://github.com/MadLittleMods","followers_url":"https://api.github.com/users/MadLittleMods/followers","following_url":"https://api.github.com/users/MadLittleMods/following{/other_user}","gists_url":"https://api.github.com/users/MadLittleMods/gists{/gist_id}","starred_url":"https://api.github.com/users/MadLittleMods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadLittleMods/subscriptions","organizations_url":"https://api.github.com/users/MadLittleMods/orgs","repos_url":"https://api.github.com/users/MadLittleMods/repos","events_url":"https://api.github.com/users/MadLittleMods/events{/privacy}","received_events_url":"https://api.github.com/users/MadLittleMods/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-10T18:28:10Z","updated_at":"2015-02-12T17:08:00Z","closed_at":null,"body":"I am trying to use [`Route.ignoreScrollBehavior`](https://github.com/rackt/react-router/blob/master/docs/api/components/Route.md#ignorescrollbehavior) on each route to stop the jump-to-top effect when clicking a [`<Link>`](https://github.com/rackt/react-router/blob/master/docs/api/components/Link.md) element. But it doesn't seem to do anything because on each page change, the scroll position moves to the top.\r\n\r\n[Full snippet here](https://gist.github.com/anonymous/d18e7de5454cf478e95c)\r\n[`Route.ignoreScrollBehavior`](https://github.com/rackt/react-router/blob/master/docs/api/components/Route.md#ignorescrollbehavior)\r\n```\r\n<Route name=\"all\" handler={TodoApp} ignoreScrollBehavior />\r\n```\r\n\r\nTried this from something I saw in the [changelog](https://github.com/rackt/react-router/blob/master/CHANGELOG.md#v093---wed-08-oct-2014-144452-gmt)\r\n\r\n```\r\n<Route name=\"all\" handler={TodoApp}  scrollBehaviour=\"none\" />\r\n```\r\n\r\n---\r\n\r\nI tried setting the [`scrollBehaviour` in `Router.create`](https://github.com/rackt/react-router/blob/master/docs/api/create.md#scrollbehavior) but that doesn't seem to do anything. I also found this confusing because the documentation isn't clear on what to set the value as. \r\n\r\nI found [some documentation](https://github.com/rackt/react-router/blob/master/UPGRADE_GUIDE.md#preservescrollposition---scrollbehavior) saying you can use strings. I assume this is actually for adding the `scrollBehaviour` property to a `<Route>` itself which is deprecated and removed. Strings don't work anyway because it complains about it not having a `updateScrollPosition` property.\r\n\r\n - 'browser'\r\n - 'scrollToTop'\r\n - 'none'\r\n\r\nI assume that it wants to use the [modules/behaviors](https://github.com/rackt/react-router/tree/master/modules/behaviors) that are exported. In the tests, the behaviours are used.\r\n\r\n```\r\nvar { ImitateBrowserBehavior, ScrollToTopBehavior } = Router;\r\n\r\nRouter.create({\r\n\troutes: routes,\r\n\tscrollBehaviour: ImitateBrowserBehavio // or `ScrollToTopBehavior`\r\n});\r\n```\r\n\r\nRelated to issue #432."},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/74109808","html_url":"https://github.com/rackt/react-router/issues/810#issuecomment-74109808","issue_url":"https://api.github.com/repos/rackt/react-router/issues/810","id":74109808,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T17:08:00Z","updated_at":"2015-02-12T17:08:00Z","body":"The reason for removal was that, unlike React normal props, those wouldn't be kept in sync. In fact, there would be no way to update them once set. This confused many people.\r\n\r\nWhy not use a param instead? Have one route, make filter a route parameter, and pass it as either a prop to Handler (`state.params.filter`) or read it inside TodoApp from `this.getParams().filter` using `State` mixin. "}}