Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

opening a link in another tab in react

import React from "react";

function App() {
  const handleClick = () => {
    window.open("http://twitter.com/saigowthamr");
  };

  return (
    <div>
      <h2>App</h2>
      <button onClick={handleClick}>Twitter</button>
    </div>
  );
}

export default App;
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript sleep settimeout 
Javascript :: view background image in react native 
Javascript :: javascript if has jquery loaded 
Javascript :: golang http POST JSON content 
Javascript :: jquery selector partial class name 
Javascript :: import fetch from ("node-fetch"); ^^^^^^ SyntaxError: Cannot use import statement outside a module 
Javascript :: javascript index of min value in array 
Javascript :: getting form values in javascript 
Javascript :: __dirname is not defined 
Javascript :: send refresh token in axios interceptor 
Javascript :: count number of duplicate pairs in array javascript 
Javascript :: javascript get element tag 
Javascript :: jquery find by data attribute 
Javascript :: js ceil 
Javascript :: find longest word in string javascript 
Javascript :: object.keys 
Javascript :: add date in javascript 
Javascript :: get form data in react 
Javascript :: react bind function to component 
Javascript :: how to split string into array javascript 
Javascript :: javascript add line from file to array 
Javascript :: on click jquery 
Javascript :: make a get request in node js 
Javascript :: python iterate json file 
Javascript :: react check if mobile or desktop 
Javascript :: jsp include html 
Javascript :: javascript minimum number in array 
Javascript :: Disable Multiple Form Submits with Vanilla JavaScript 
Javascript :: uncheck a checkbox in javascript 
Javascript :: get ascii value of char javascript 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =