Recall & Review
beginner
What is the purpose of the
expo-camera library in React Native?The
expo-camera library allows React Native apps to access and use the device's camera for taking photos and recording videos.Click to reveal answer
beginner
How do you request permission to use the camera with
expo-camera?You use the
Camera.requestCameraPermissionsAsync() method to ask the user for permission to access the camera.Click to reveal answer
beginner
What React hook is commonly used to manage camera permission state in a functional component?
The
useState hook is used to store and update the camera permission status (granted or denied).Click to reveal answer
intermediate
Why should you check camera permissions before rendering the camera view?
Checking permissions first ensures the app only tries to show the camera if the user has allowed access, preventing errors and improving user experience.
Click to reveal answer
beginner
How do you display the camera preview on screen using
expo-camera?You render the
<Camera> component from expo-camera and set its style and type (front or back camera).Click to reveal answer
Which method requests camera permission in
expo-camera?✗ Incorrect
The correct method to request camera permission is
Camera.requestCameraPermissionsAsync().What React hook is best to track if camera permission is granted?
✗ Incorrect
The
useState hook is used to store and update permission status.Which component shows the live camera feed in
expo-camera?✗ Incorrect
The
<Camera> component displays the live camera preview.What should you do if camera permission is denied?
✗ Incorrect
If permission is denied, show a message or alternative UI to inform the user.
Which camera type can you select in
expo-camera?✗ Incorrect
You can choose between front and back cameras using the
type prop.Explain how to request and handle camera permissions using
expo-camera in a React Native app.Think about asking the user first, then showing the camera only if allowed.
You got /4 concepts.
Describe how to display a live camera preview using the
expo-camera library.Focus on the component and props needed for the preview.
You got /4 concepts.