Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. // parent component
  2. <tr onClick={() => this.props.history.push(`users/${id}`)}>
  3.  
  4. // users page receives the id from the parent
  5. // component with this.props.history.push()
  6. <Tab label='Users' key='users'>
  7. <div>users page content</div>
  8. </Tab>
  9.  
  10. // This page must also receive the id from parent component.
  11. // The structure is similar to users page.
  12. <Tab label='Info' key='info'>
  13. <Redirect to={'/info'} />
  14. </Tab>
  15.  
  16. [tab 1]: users/12345
  17. [tab 2]: info/12345
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement