Skip to content

Instantly share code, notes, and snippets.

@benknight
Last active August 29, 2015 14:24
Show Gist options
  • Save benknight/a479e06f07af5b19e35a to your computer and use it in GitHub Desktop.
Save benknight/a479e06f07af5b19e35a to your computer and use it in GitHub Desktop.
// Route:
<Route name="agent-detail" path=":name" handler={AgentProfile}>
<Route name="agent-detail-tab" path=":tab" handler={AgentProfile} />
</Route>
// Handler function
handleTabToggle(key) {
this.replaceWith('agent-detail-tab', {name: this.state.slug, tab: key});
},
// In render():
// TabbedArea from react-bootstrap:
<TabbedArea defaultActiveKey={this.props.params.tab} animation={false} className="AgentProfileTabs" onSelect={this.handleTabToggle}>
// ...
</TabbedArea>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment