Answers for "how to open a new tab when u click a link reactjs"

4

open a new tab when clicking on a link react

<td onClick={()=> window.open("someLink", "_blank")}>text</td>
Posted by: Guest on August-13-2020
1

react onclick new tab

const openInNewTab = (url) => {
  const newWindow = window.open(url, '_blank', 'noopener,noreferrer')
  if (newWindow) newWindow.opener = null
}
Posted by: Guest on October-14-2021

Code answers related to "how to open a new tab when u click a link reactjs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language