Hello
Will this cause lazy load to fail?
const sortedTasks = realmRef?.objects('Task').sorted('@id');
setTasks([...sortedTasks]);
And then using tasks inside a flat list. Will this cause all to be rendered?
And i read in other SDK’s that there is a limit function.
Because we need to render data based on user input.
Hello,
Does anyone have a update on this?
Jay
(Jason Wooten)
October 11, 2021, 7:45pm
3
sortedTasks
will be a lazily loaded results object. Why not use that directly?
opened 03:26PM - 04 Oct 21 UTC
closed 07:13AM - 05 Oct 21 UTC
T-Help
O-Community
### How frequently does the bug occur?
All the time
### Description
Hello!
…
I read realmjs is lazy loaded so using Object.(... for example in a flatlist i causing it to be lazy loaded.
But i had a few questions
1. Is it actually laze loaded into flat list?
2. When i use a function to get all tasks sorted by date and put it inside a react.useState, is it still lazy loaded?
3. Is there a limit option in react native? I couldt find anything in dogs, because otherwise i would implement a onEndReached function to load on demand.
### Stacktrace & log output
```shell
N/A
```
### Can you reproduce the bug?
Yes, always
### Reproduction Steps
N/A
### Version
Newest
### What SDK flavour are you using?
Local Database only
### Are you using encryption?
No, not using encryption
### Platform OS and version(s)
N/A
### Build environment
Which debugger for React Native: ..
N/A
Hello i already stated this in my github thread but.
const realmRef = useRealm();
const tasks = realmRef.objects('Task');
return (
<View>
<FlatList
data={tasks.sorted('@id')}
renderItem={renderItem}
keyExtractor={(item) => item.id}
/>
</View>
Even when doing this. Its still laggy. With 1200 taks this is so laggy. 400mb ram usage, 30 fps on scroll. And initial it console.log all.
Instead of loggin “ön lazy load”