Skip to content

Commit 2ca97d9

Browse files
authored
Update README.md (#152)
Changed the `RNMLKitDetectedObject` to `RNMLKitObjectDetectionObject` type as the former was no longer in the library, basically got updated to the new latter
1 parent 2b40a40 commit 2ca97d9

File tree

1 file changed

+6
-6
lines changed
  • modules/react-native-mlkit-object-detection

1 file changed

+6
-6
lines changed

modules/react-native-mlkit-object-detection/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ app's lifecycle you load the model.
8282

8383
import {
8484
useObjectDetector,
85-
RNMLKitDetectedObject,
85+
RNMLKitObjectDetectionObject,
8686
} from "@infinitered/react-native-mlkit-object-detection";
8787
import { useEffect } from "react";
8888

@@ -107,8 +107,8 @@ function MyComponent() {
107107
loadModel();
108108
}, [model, modelLoaded]);
109109

110-
// the output of the model is an array of `RNMLKitDetectedObject` objects
111-
const [result, setResult] = useState<RNMLKitDetectedObject[]>([]);
110+
// the output of the model is an array of `RNMLKitObjectDetectionObject` objects
111+
const [result, setResult] = useState<RNMLKitObjectDetectionObject[]>([]);
112112

113113
useEffect(() => {
114114
if (!modelLoaded) return;
@@ -212,7 +212,7 @@ function App() {
212212

213213
import {
214214
useObjectDetector,
215-
RNMLKitDetectedObject,
215+
RNMLKitObjectDetectionObject,
216216
} from "@infinitered/react-native-mlkit-object-detection";
217217
import { useEffect } from "react";
218218

@@ -237,8 +237,8 @@ function MyComponent() {
237237
loadModel();
238238
}, [model, modelLoaded]);
239239

240-
// the output of the model is an array of `RNMLKitDetectedObject` objects
241-
const [result, setResult] = useState<RNMLKitDetectedObject[]>([]);
240+
// the output of the model is an array of `RNMLKitObjectDetectionObject` objects
241+
const [result, setResult] = useState<RNMLKitObjectDetectionObject[]>([]);
242242

243243
useEffect(() => {
244244
if (!modelLoaded) return;

0 commit comments

Comments
 (0)