Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react onclick new tab

const openInNewTab = (url) => {
  const newWindow = window.open(url, '_blank', 'noopener,noreferrer')
  if (newWindow) newWindow.opener = null
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #onclick #tab
ADD COMMENT
Topic
Name
5+1 =