Infinite Re-renders
Rn: 0.79.5 Expo: 53 my app keeps on rerendering
const MODELS: ObjectDetectionConfig = {
selfieDetector: {
model: require("../assets/models/selfie_multiclass_256x256.tflite"),
},
};
export default function RootLayout() {
// Load the models
const models = useObjectDetectionModels({
assets: MODELS,
loadDefaultModel: false,
defaultModelOptions: {
shouldEnableMultipleObjects: true,
shouldEnableClassification: true,
detectorMode: "singleImage",
},
});
// Get the provider component
const { ObjectDetectionProvider } = useObjectDetectionProvider(models);
return (
<ObjectDetectionProvider>
<! -- children -->
</ObjectDetectionProvider>
);
+1
Hey @iampato - sorry for the delay here. We are gonna take a look at Expo 53 support soon, but in the meantime can you please add a full reproducer here so we can see the actual error? Want to make sure we are debugging your exact issue. Thanks!
Try out the latest version, 4.0.0 which was built for Expo SDK 53. This issue isn't reproducible in the Example App if you take a look how it is used there perhaps.
Since we haven't heard from @iampato and we've seen the updates fix this, I'm gonna close the issue out. Let us know if you still have problems!