This is an invalid syntax for some reason
<Link to={'/page/with/' + id + '/' + name}>Some param Page</Link>
The entire error is this and the app just doesn't compiles
Line 17: Unexpected use of 'name' no-restricted-globals
Search for the keywords to learn more about each error.
But this one is valid
<Link to={'/page/with/' + id}>Some param Page</Link>
So my question is how can i make a link that matches
<Route path="/page/with/:id/:name" component={SomeParamPage}/>
The route is valid if write directly in the url it works, the problem is the Link
import React from 'react'
import {Link} from 'react-router-dom'
let id = 2;
let name = 'sasho';
const Header = () => (
<h2>
Header
<br/>
<Link to="/">Home</Link>
<br/>
<Link to="/about">About</Link>
<br/>
<Link to="/about-us">About us</Link>
<br/>
<Link to="/contact">Home</Link>
<br/>
<Link to={'/page/with/' + id + '/' + name}>Some param Page</Link>
</h2>
);
export default Header;