Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for initiating signup or login with email or phone
useSignUpOrLogIn
useVerifyNewAccount
useWaitForLogin
import { useSignUpOrLogIn } from "@getpara/react-native-wallet";
import { useSignUpOrLogIn } from "@getpara/react-native-wallet"; import { useState } from "react"; import { View, TextInput, Button, Text } from "react-native"; function LoginScreen() { const [email, setEmail] = useState(""); const { signUpOrLogInAsync, isPending } = useSignUpOrLogIn(); const handleSubmit = async () => { try { const result = await signUpOrLogInAsync({ auth: { email } }); // result is AuthStateVerify (new user) or AuthStateLogin (returning user) } catch (err) { console.error(err); } }; return ( <View> <TextInput value={email} onChangeText={setEmail} placeholder="Email" /> <Button title={isPending ? "Sending..." : "Continue"} onPress={handleSubmit} disabled={isPending} /> </View> ); }