jondot / jondot/react-native-slowlog

Two instances of the same component

Open
#4 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
377
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I guess this repo is not maintained any more.
Anyway, for those who is still using it.

I've got an annoying error recently and have spent quite some time trying to figure out what's going on...
I have two instances of the same component. The component has `FlatList` with accompanying `renderItem` function. The function is bound to the component.
The error occurred when trying to render the second instance: the render method was calling the `renderItem` function of the first instance (??), so when I tried to get this.props inside `renderItem` it returned the props of the first instance.
Removed `slowlog(this, /.*/);` and everything is fine again.

Take care.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.