0

I'm working with my first electron app. I have a component that links to another component in another route.

I'm just not sure how to do it.

Here's my code:

<Link to={`${routes.SOMEPATH}?id=${id}`}>
  My Link
</Link>

When the user clicks the link, the new component is loaded, but how do I get the value for id?

ss_matches
  • 497
  • 2
  • 5
  • 20

1 Answers1

0

id should be stored in this.props.match.params.

Passing props through React-Router v4 <Link />

James_F
  • 449
  • 2
  • 8