Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Benefits of using Realm Listview over standard React Native Listview

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?

like image 392
David Avatar asked Apr 08 '16 14:04

David


1 Answers

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.

like image 167
Scott Kyle Avatar answered Nov 18 '22 01:11

Scott Kyle