MMA301_-_SU_2023_-_2_514.webp
M

MMA301_-_SU_2023_-_2_514.webp

(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)


  • Like
Reactions: Quangdung

Thông tin

Category
MMA301
Thêm bởi
minhduc94
Ngày thêm
Lượt xem
2,087
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
MMA301_-_SU_2023_-_2_514.webp
File size
67.3 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom