shirakaba / react-nativescript

React renderer for NativeScript
https://react-nativescript.netlify.com
MIT License
280 stars 14 forks source link

ListView rootKeys are prone to clashing #33

Closed shirakaba closed 5 years ago

shirakaba commented 5 years ago

Easy to see in action simply by using two ListViews in the same app (without unmounting one list prior to mounting the other). Each ListView generates root keys in the same way (using a counter) and those IDs very easily clash between instances.

Consequence: ListView cells appearing as being empty.

So instead, each ListView needs to at least have its own unique key to prefix the root keys we'd otherwise be generating.

shirakaba commented 5 years ago

Fixed in local branch; will push later. rootKeys are now based on the unique DOM ID for the ListView.