Hello!
I’m using useQuery to access a list from a realm schema.
The problem in question is that, after inserting an item into the list, apparently the realm db is not reporting the updated list to me.
Has anyone ever experienced this?
This is the current component where I list the customers.
Thank you very much in advance!
import { useQuery } from '@realm/react';
const clients = useQuery(ClientSchema);
<S.ClientsList
data={clients}
keyExtractor={(client) => `${client._id}`}
ListEmptyComponent={
<EmptyList isLoading={false} text="Nenhum cliente encontrado" />
}
renderItem={({ item: client }) => (
<ClientCard
client={client}
onChange={(client) => {
console.log({ client });
// setIsShowClientModal(false);
}}
/>
)}
/>
ClientsList is a FlatList.