Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 298 Bytes

link-passing-additional-data.md

File metadata and controls

21 lines (17 loc) · 298 Bytes

Link Passing Additional Data

Component A

<Link to={{
	pathname: '/user/1234',
	state: {tabToFocus: 'list'}
}}>
	Return to the list
</Link>

Component B

getTabToFocus() {
	const { location } = this.props;
	return location && location.state && location.state.tabToFocus;
}