How to use supabase-js next?
The most recent Realtime blog post says to use the newest release of supabase-js, but it is unclear how to do that.
1. Is it as simple as running something like
yarn add @supabase/supabase-js@next
?
2. How do I know if I am on the correct release (there is no version number in the package.json??)
3. Will the reference docs be updated to include Broadcast information? (https://supabase.com/docs/reference/javascript/next/subscribe)on().subscribe() | Supabase
Parameters
5 Replies
Hey, here are the versions. https://www.npmjs.com/package/@supabase/supabase-js
npm
@supabase/supabase-js
Isomorphic Javascript client for Supabase. Latest version: 1.35.6, last published: 18 days ago. Start using @supabase/supabase-js in your project by running
npm i @supabase/supabase-js
. There are 96 other projects in the npm registry using @supabase/supabase-js.Looks like
v1
is still tagged as next
try yarn add @supabase/supabase-js@2.0.0-rc.6
didnt know about the version page on npm, thanks for pointing me towards that!
I used
supabase-js
v2 for this project and it includes realtime https://github.com/jensen/supabooked/blob/1f7e3b6174a711e0dc9e158f8f6a5604e32147c7/src/routes/admin/invitations.tsx#L72
That is an example of listening to postgres changes. Here is one for presence https://github.com/jensen/supabooked/blob/1f7e3b6174a711e0dc9e158f8f6a5604e32147c7/src/context/status.tsx#L24thank you!