infinitered / infinitered/react-native-mlkit

Infinite Re-renders

Open
#222 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs reproduction
Dominant language
TypeScript
Stars
444
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Rn: 0.79.5
Expo: 53
my app keeps on rerendering
```ts
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 (


);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the rerender with the reported React Native 0.79.5 and Expo 53 snippet. Trace the useObjectDetectionModels and useObjectDetectionProvider entry points to identify what triggers repeated renders; done means the shown RootLayout no longer rerenders indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
machine-learning, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.