When I clicked on the link, I got a 404 error in the production build of react js and showed an error on the firebase hosting website.
<Link target='_blank' to={'/property-details?id='some_id'}/>
When I clicked on the link, I got a 404 error in the production build of react js and showed an error on the firebase hosting website.
<Link target='_blank' to={'/property-details?id='some_id'}/>
To fix it, you can change your code to below.
<Link to="/home" target="_blank" rel="noopener noreferrer" />
Just add the rel
attribute to fix it. This may also improve your page performance.
If you want to use the <a>
tag instead, then you can use the following code.
<a href="https://stackoverflow.com/" target="_blank" rel="noreferrer noopener">Stack Overflow</a>
The rel
attribute will improve page performance.
That should be because you have an odd number of single quotes. Check your opening and closing quotes. From here, I can even see that the 'some_id' black color which is different from the rest of the letters when the are in quotes. They should be of the same color. I think that how I quickly figured out that the issue is probably from the single quotes.