© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•13mo ago
ocexnn

How to handle initial undefined state

Hey guys! I need some help on something that is probably trivial to a lot of you. I am using the useLiveQuery hook to get and then display data on a screen in my app (it's a todo app and i'm essentially getting the list data to be able to display) .

The problem is that whenever I want to access said data, I ALWAYS have to use the optional selector to handle the initial undefined state. So my code is FILLED with a whole bunch of ? marks...

How do you guys avoid having to do this?? I've used React Query before and the nice thing with them is that their useQuery hook returns a loading state that I can use to handle the initial undefined state of data and then display it, but I don't have that kind of feature with Drizzle.
Any help would be appreciated, I've been on this "issue" for days now and I can't find any docs or help about it online.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to deal with initial undefined data
Drizzle TeamDTDrizzle Team / help
13mo ago
How to handle partitions?
Drizzle TeamDTDrizzle Team / help
3y ago
Prepared statement returns undefined
Drizzle TeamDTDrizzle Team / help
3y ago
how to set an initial autoincrement value
Drizzle TeamDTDrizzle Team / help
11mo ago