{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/1375","labels_url":"https://api.github.com/repos/rackt/react-router/issues/1375/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/1375/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/1375/events","html_url":"https://github.com/rackt/react-router/issues/1375","id":89813811,"number":1375,"title":"Simple redirect Example","user":{"login":"basiclaser","id":3663537,"avatar_url":"https://avatars.githubusercontent.com/u/3663537?v=3","gravatar_id":"","url":"https://api.github.com/users/basiclaser","html_url":"https://github.com/basiclaser","followers_url":"https://api.github.com/users/basiclaser/followers","following_url":"https://api.github.com/users/basiclaser/following{/other_user}","gists_url":"https://api.github.com/users/basiclaser/gists{/gist_id}","starred_url":"https://api.github.com/users/basiclaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basiclaser/subscriptions","organizations_url":"https://api.github.com/users/basiclaser/orgs","repos_url":"https://api.github.com/users/basiclaser/repos","events_url":"https://api.github.com/users/basiclaser/events{/privacy}","received_events_url":"https://api.github.com/users/basiclaser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-20T20:22:05Z","updated_at":"2015-06-22T13:43:30Z","closed_at":null,"body":"I couldn't find a simple workable example of transferring a user to a different page from within a normal function. I can do it in the routes declaration like   `<Redirect from=\"here\" to=\"index\" />`\r\nand with a link anywhere else using the `<Link to=\"index\"><i>lets go!</i> </Link> `. \r\n\r\nHowever now id like to direct to \"index\" just from within a function like: \r\n```\r\n  onDelete: function(){\r\n    var answer = prompt(\"type yes if you want to delete this note\");\r\n    if(answer == \"yes\") {\r\n      localStorage.removeItem(this.props.route);\r\n      REDIRECT BACK TO INDEX\r\n    }\r\n  }\r\n```\r\nThanks for your help! I'm sure its an available method, I just couldn't find it"},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/114108708","html_url":"https://github.com/rackt/react-router/issues/1375#issuecomment-114108708","issue_url":"https://api.github.com/repos/rackt/react-router/issues/1375","id":114108708,"user":{"login":"Nickman87","id":870416,"avatar_url":"https://avatars.githubusercontent.com/u/870416?v=3","gravatar_id":"","url":"https://api.github.com/users/Nickman87","html_url":"https://github.com/Nickman87","followers_url":"https://api.github.com/users/Nickman87/followers","following_url":"https://api.github.com/users/Nickman87/following{/other_user}","gists_url":"https://api.github.com/users/Nickman87/gists{/gist_id}","starred_url":"https://api.github.com/users/Nickman87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nickman87/subscriptions","organizations_url":"https://api.github.com/users/Nickman87/orgs","repos_url":"https://api.github.com/users/Nickman87/repos","events_url":"https://api.github.com/users/Nickman87/events{/privacy}","received_events_url":"https://api.github.com/users/Nickman87/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T13:43:30Z","updated_at":"2015-06-22T13:43:30Z","body":"Have you seen this? http://rackt.github.io/react-router/#Navigation\r\n\r\nJust add in the Navigation mixin en you can go: this.transitionTo(routename, params, query);\r\nwhenever you want in the component."}}