Home > Blockchain >  a href in react opening subroute instead of new link
a href in react opening subroute instead of new link

Time:10-20

item.link = "www.youtube.com"

 <a href = {item.link} target="_blank" rel="noopener noreferrer">{item.about}</a>

This tag is making a call to localhost:3000/www.youtube.com

CodePudding user response:

If you add the "protocol" to link like item.link = "http://www.youtube.com

Will work as expected

  • Related