使用useAuth0() hook中的isLoading属性来代替Auth0ContextInterface中的isLoading属性。示例代码如下:
import React from 'react'; import { useAuth0 } from '@auth0/auth0-react';
const MyComponent = () => { const { isLoading } = useAuth0();
return (
Loading...
} {!isLoading &&Authenticated!
}export default MyComponent;