From d3c19a4f8c7d003aa2fe84ba87fda22716041869 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 22 Feb 2021 14:35:59 +0100 Subject: [PATCH] fix docs --- docs/DEVICES.md | 18 ++++++++++++++++-- docs/ERRORS.md | 14 ++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/DEVICES.md b/docs/DEVICES.md index dc2f08d..5eb0f70 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -66,10 +66,17 @@ The react-native-vision-camera library provides a hook to make camera device sel You can specify a device type to only find devices with the given type: -```ts +```tsx function App() { const devices = useCameraDevices('wide-angle-camera') const device = devices.back + + return ( + + ) } ``` @@ -77,9 +84,16 @@ Or just return the "best matching camera device". This function prefers camera d > Example: `triple-camera` > `dual-wide-camera` > `dual-camera` > `wide-angle-camera` > `ultra-wide-angle-camera` > `telephoto-camera` > ... -```ts +```tsx function App() { const devices = useCameraDevices() const device = devices.back + + return ( + + ) } ``` diff --git a/docs/ERRORS.md b/docs/ERRORS.md index 27c0bbd..a6b6f36 100644 --- a/docs/ERRORS.md +++ b/docs/ERRORS.md @@ -60,12 +60,7 @@ function App() { console.error(error) }, []) - return ( - - ) + return } ``` @@ -94,11 +89,6 @@ function App() { } }, [camera]); - return ( - - ) + return } ```