Update FORMATS.md

This commit is contained in:
Marc Rousavy 2021-03-01 12:43:15 +01:00 committed by GitHub
parent 47ca374e86
commit 61ffe486a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,7 @@ function App() {
const devices = useCameraDevices() const devices = useCameraDevices()
const device = devices.back const device = devices.back
if (device == null) return <LoadingView />
return ( return (
<Camera <Camera
style={StyleSheet.absoluteFill} style={StyleSheet.absoluteFill}
@ -83,6 +84,7 @@ function App() {
}, undefined); }, undefined);
}, [device?.formats]); }, [device?.formats]);
if (device == null) return <LoadingView />
return ( return (
<Camera <Camera
style={StyleSheet.absoluteFill} style={StyleSheet.absoluteFill}
@ -129,6 +131,7 @@ The `Camera` View provides a few props that depend on the specified `format`. Fo
```tsx ```tsx
function App() { function App() {
// ...
return ( return (
<Camera <Camera
style={StyleSheet.absoluteFill} style={StyleSheet.absoluteFill}