Reputation: 3239
<Link to=`/event/${event_id}?start=${startDate}&?end=${endDate}` target="_blank">
..content
</Link>
what's wrong with above snytax? I spot nothing wrong.
Upvotes: 0
Views: 75
Reputation: 2725
In addition to @Tharaka 's answer you should add a property
rel='noopener noreferrer'
See here why
<Link to={`/event/${event_id}?start=${startDate}&?end=${endDate}`} target="_blank" rel='noopener noreferrer'>
..content
</Link>
It's considered as a best practice.
Upvotes: 0
Reputation: 8065
Warp your `` inside brackets since this is Javascript and JSX interprets Javascript only when it's between brackets.
<Link to={`/event/${event_id}?start=${startDate}&?end=${endDate}`} target="_blank">
..content
</Link>
Upvotes: 3