Hello, @seeden, I am try to use react facebook in my project. But when I add Facebook provider to my project, It throwing an error like this ReferenceError: React is not defined
My Project running with-
- Next js
- Typescript
The version I am using-
Latest version 9.0.7
<FacebookProvider appId={process.env.NEXT_PUBLIC_FACEBOOK_APP_ID as string}>
<FacebookLogins />
</FacebookProvider>
And this is FacebookLogins.tsx Component-
import { useLogin } from 'react-facebook';
export default function LoginExample() {
const { login, status, isLoading, error } = useLogin();
async function handleLogin() {
try {
const response = await login({
scope: 'email',
});
console.log(response.status);
} catch (error: any) {
console.log(error.message);
}
}
return (
<button onClick={handleLogin} disabled={isLoading}>
Login via Facebook
</button>
);
}
Where I am wrong, How can I solve it.

Hello, @seeden, I am try to use react facebook in my project. But when I add Facebook provider to my project, It throwing an error like this
ReferenceError: React is not definedMy Project running with-
The version I am using-
Latest version
9.0.7And this is
FacebookLogins.tsxComponent-Where I am wrong, How can I solve it.