(41
(Choose 1 answer)
Which of these code snippets represents the final code that configures the login Pressable component?
A. // State const [loggedIn, onLogin] = useState(false);
// Component
<Pressable onPress={() => onLogin(!loggedin)} style={styles.button}>
<Text style={styles.buttonText}>Log in</Text>
</Pressable>
B. // State
const [loggedIn, onLogin] = useState(false);
// Component
<Pressable onPress={!loggedIn} style={styles.button}>
<Text style={styles.buttonText}>Log in</Text>
</Pressable>
C. // State const [loggedin, onLogin] = useState(false);
// Component
<<Pressable onPress=(!loggedIn) style={styles.button}>
<Text style={styles.buttonText}>Log in</Text>
</Pressable>
D. // State const floggedin onlogin] = useState(false)