{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/2692","labels_url":"https://api.github.com/repos/rackt/react-router/issues/2692/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/2692/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/2692/events","html_url":"https://github.com/rackt/react-router/pull/2692","id":121282203,"number":2692,"title":"Updates tab example to allow for IndexLink as appropriate.","user":{"login":"rralian","id":134044,"avatar_url":"https://avatars.githubusercontent.com/u/134044?v=3","gravatar_id":"","url":"https://api.github.com/users/rralian","html_url":"https://github.com/rralian","followers_url":"https://api.github.com/users/rralian/followers","following_url":"https://api.github.com/users/rralian/following{/other_user}","gists_url":"https://api.github.com/users/rralian/gists{/gist_id}","starred_url":"https://api.github.com/users/rralian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rralian/subscriptions","organizations_url":"https://api.github.com/users/rralian/orgs","repos_url":"https://api.github.com/users/rralian/repos","events_url":"https://api.github.com/users/rralian/events{/privacy}","received_events_url":"https://api.github.com/users/rralian/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-09T16:15:37Z","updated_at":"2015-12-09T18:18:40Z","closed_at":"2015-12-09T17:07:04Z","pull_request":{"url":"https://api.github.com/repos/rackt/react-router/pulls/2692","html_url":"https://github.com/rackt/react-router/pull/2692","diff_url":"https://github.com/rackt/react-router/pull/2692.diff","patch_url":"https://github.com/rackt/react-router/pull/2692.patch"},"body":"The Tab example was really helpful to address what I think is a very common case (following bootstrap's navigation markup). Since it's likely that the developer would also need to use IndexLink, I just added a couple tweaks here to allow for it. Also, I believe it's preferable to use `const` over `let` when a variable is not meant to change. So I switched a couple of declarations."},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/163347466","html_url":"https://github.com/rackt/react-router/pull/2692#issuecomment-163347466","issue_url":"https://api.github.com/repos/rackt/react-router/issues/2692","id":163347466,"user":{"login":"rralian","id":134044,"avatar_url":"https://avatars.githubusercontent.com/u/134044?v=3","gravatar_id":"","url":"https://api.github.com/users/rralian","html_url":"https://github.com/rralian","followers_url":"https://api.github.com/users/rralian/followers","following_url":"https://api.github.com/users/rralian/following{/other_user}","gists_url":"https://api.github.com/users/rralian/gists{/gist_id}","starred_url":"https://api.github.com/users/rralian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rralian/subscriptions","organizations_url":"https://api.github.com/users/rralian/orgs","repos_url":"https://api.github.com/users/rralian/repos","events_url":"https://api.github.com/users/rralian/events{/privacy}","received_events_url":"https://api.github.com/users/rralian/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T18:18:40Z","updated_at":"2015-12-09T18:18:40Z","body":"> Don't you think it might be better to use the onlyActiveOnIndex prop here instead of branching on the choice of link component? Feel like it might be a bit cleaner.\r\n\r\nThat prop isn't available at the level where we need it. It gets added by `IndexLink` to be used inside the `Link` component. But we need to know this is an IndexLink in the `li` parent component. If anything we could create a separate component called `IndexTab` that only uses IndexLink, rather than having a branch on the choice of link component. But I didn't want to make the example too involved."}}