infinitered / infinitered/react-native-mlkit
Infinite Re-renders
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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