useIsFullyLoggedIn hook returns whether the current user has a valid, active session. Use it to gate authenticated screens or trigger navigation after login.
Hook for checking whether the user is fully authenticated
useIsFullyLoggedIn hook returns whether the current user has a valid, active session. Use it to gate authenticated screens or trigger navigation after login.
import { useIsFullyLoggedIn } from "@getpara/react-native-wallet";
import { useIsFullyLoggedIn } from "@getpara/react-native-wallet";
import { View, Text } from "react-native";
function App() {
const { data: isLoggedIn } = useIsFullyLoggedIn();
if (isLoggedIn === undefined) {
return <Text>Loading...</Text>;
}
return (
<View>
{isLoggedIn ? <AuthenticatedScreen /> : <LoginScreen />}
</View>
);
}