© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
9 replies
ʀᴇᴛᴄʏ O▢△

Use realtime across multiple routes in Sveltekit

Hey!
I have an app with posts and a search feature, how can I use realtime in a convenient way instead of copy pasting the code in each route?
I tried doing this:
$lib/index.ts (realtime channel and sveltekit store) -> route with post (will the check if the payload has something to do with the post)
$lib/index.ts (realtime channel and sveltekit store) -> route with post (will the check if the payload has something to do with the post)

But I have a problem importing supabase in the $lib folder
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

Sveltekit protected routes question
SupabaseSSupabase / help-and-questions
6mo ago
Use supabase in Sveltekit Components
SupabaseSSupabase / help-and-questions
3y ago
Handling multiple sessions across devices
SupabaseSSupabase / help-and-questions
5mo ago
how to use realtime
SupabaseSSupabase / help-and-questions
4y ago