So I'm using this <Link> component from react, now the issue is if I write <Link to='/pathname'> Text </Link> it works perfectly... but if I write <Link to={{ pathname:pathname, state: {data:data} }}>Text</Link> then it changes the url, but doesn't mount the intended component, neither it keeps the previous one, so I'm left with an empty white page. Though if I refresh, then it loads all the data I intended to load. Why isn't the desired Component rendering ??
<Link>
<Link to='/pathname'> Text </Link>
<Link to={{ pathname:pathname, state: {data:data} }}>Text</Link>
1.4m articles
1.4m replys
5 comments
57.0k users