The Realm documentation recommends using their implementation of ListView:
import { ListView } from 'realm/react-native';
But I can't find any info on what the actual difference is and what the benefits are.
Also with new react native versions coming out every other week won't it risk getting outdated pretty fast?
When used with Realm collections (i.e. List
or Results
), the Realm ListView
is designed to be more CPU/memory efficient than the stock ListView
. It also will help prevent common pitfalls by automatically using static snapshots of the collections, which is necessary since Realm collections can change at any time. So we recommend using it for preventing certain classes of bugs, as well as for the performance benefit.
I will update the documentation with some of this information. We're actively monitoring for any possible breaking changes in the React Native repo, but it's designed to (hopefully) not break for most kinds of changes to the stock ListView
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With