Microsoft Graph Toolkit Component Mgt-login Event Is Not Called In React App With Hooks
I have implemented mgt-login component from Microsoft Graph toolkit, it is working fine but it's not calling event I added to mgt-login within useEffect. Duplicate question here -
Solution 1:
To make the use of mgt components in React easier, we created a React wrapper that you can use here, mgt-react.
import React, {
useRef,
useEffect,
} from 'react';
import {Login} from '@microsoft/mgt-react';
const Login = () => {
return (
<div className="login">
<Login loginCompleted={(e) => console.log('Logged in')} />
</div>
);
};
Post a Comment for "Microsoft Graph Toolkit Component Mgt-login Event Is Not Called In React App With Hooks"