google signup with react code example

Example 1: google sign up react npm

npm install react-google-login

Example 2: google sign up react npm

import React from 'react';import ReactDOM from 'react-dom';import GoogleLogin from 'react-google-login';// orimport { GoogleLogin } from 'react-google-login';  const responseGoogle = (response) => {  console.log(response);} ReactDOM.render(  <GoogleLogin    clientId="658977310896-knrl3gka66fldh83dao2rhgbblmd4un9.apps.googleusercontent.com"    buttonText="Login"    onSuccess={responseGoogle}    onFailure={responseGoogle}    cookiePolicy={'single_host_origin'}  />,  document.getElementById('googleButton'));