acidernt
acidernt

Reputation: 2311

Best way to store many data in React Native?

What the best way to save big bulk of data in react native will be in react native app?

I already tried some things and here us my thoughts:

  1. Redux Store. Very easy way. But what if I will have 1000 items in array? They all will be in memory as an app state?
  2. Realm. Looks nice. But also documentation says, that if I need to filter something, I need to get all items first and then use filter method:

let dogs = realm.objects('Dog');
let tanDogs = dogs.filtered('color = "tan" AND name BEGINSWITH "B"');

So with realm I also thinking how it will affect on app performance.

What you think about it? Maybe I am not right? How you store your data?

P.S. BTW in future I want to create sync with server.

Upvotes: 2

Views: 1447

Answers (1)

Ari
Ari

Reputation: 1447

You should have no issues storing 1000 objects in Realm. It is optimized for storing large amounts of data and only loads data into memory when needed.

Upvotes: 2

Related Questions