You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, when the screen renders, this is the output:
console.log(data, updatedAt);
[], undefined
[/* data is now populated*], undefined,
[/* data is now populated*], YYYY-MM-DD HH:MM:SS
The second output is where you have records but updatedAt is undefined. This should not occur. You should be able to rely on updatedAt alone to determine if your query is finished.
The text was updated successfully, but these errors were encountered:
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.1
What version of
drizzle-kit
are you using?0.28.0
Other packages
No response
Describe the Bug
When using live queries, the app re-renders 3 times due to sequential states being set.
These should be combined into a single state, or
updatedAt
be a ref.const handleData = (data: any) => { setData(data); setUpdatedAt(new Date()); };
Today, when the screen renders, this is the
output:
console.log(data, updatedAt);
The second output is where you have records but
updatedAt
isundefined
. This should not occur. You should be able to rely onupdatedAt
alone to determine if your query is finished.The text was updated successfully, but these errors were encountered: