Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’4y agoβ€’
8 replies
Bojan

Can I get loading state from data fetch?

Hello, I was wondering if I could grab the loading state of a fetch so I can make some loading ui. I tried

 const { data, error, loading } = await supabase
            .from('posts')
            .select()
 if(loading){
            console.log("loading")
}
 const { data, error, loading } = await supabase
            .from('posts')
            .select()
 if(loading){
            console.log("loading")
}


But this didn't seem to return loading at all even when it was clear data was loading. I don't see loading anywhere in the docs so not sure if it's doable or not.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

can't fetch data from contains condition
SupabaseSSupabase / help-and-questions
3y ago
How can I fetch data on a user that I get from a query
SupabaseSSupabase / help-and-questions
4y ago
Error loading data from supabase
SupabaseSSupabase / help-and-questions
2mo ago
useSessionContext() + loading state?
SupabaseSSupabase / help-and-questions
4y ago