mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Added `react-supabase` library to docs. [Docs](https://react-supabase.vercel.app) [GitHub](https://github.com/tmm/react-supabase) This library differs from `useSupabase` in a few ways: 1/ *Light-weight context* `react-supabase`'s context provider only stores the Supabase `client` while `useSupabase`'s context provider keeps track of the client, auth state, and fetched tables. Some folks might not want a root context to manage all these things due to rerenders, they want to handle request caching in [SWR](https://swr.vercel.app) or [React Query](https://react-query.tanstack.com/), etc. 2/ *Reactivity* `react-supabase` hooks manage state internally and automatically update so you don't need to `useState` to set data, loading, errors, etc. `useSupabase` does not use this pattern (with the exception of `useTable`). 3/ *More hooks* `react-supbase` hooks: - general `useClient` - auth `useAuthStateChange`, `useResetPassword`, `useSignIn`, `useSignOut`, `useSignUp` - data `useDelete`, `useFilter`, `useInsert`, `useSelect`, `useUpdate` - realtime `useSubscription` `useRealtime` - storage coming soon `useSupabase` hooks: `useSupabase`, `useUser`, `useTable` 4/ *Composable hooks* - [`useAuthStateChange`](https://react-supabase.vercel.app/documentation/auth/use-auth-state-change) can be used to create your own auth state management system and not have to worry about cleaning up the auth listener. (See recipe [`useAuth`](https://react-supabase.vercel.app/recipes/use-auth).) - [`useSubscription`](https://react-supabase.vercel.app/documentation/realtime/use-subscription) allows folks to subscribe for changes in an idiomatic React way. 5/ *TypeScript support* `react-supabase` has more complete TypeScript support with generics. `useSupabase` does not.
Supabase Docs
Contributing to the specs
cd /web/spec/- run
makewhich will pull the latest TSDoc with your updates - add your comments to
supabase.yml|postgrest.yml|gotrue.yml|realtime.yml - run
npm run gen:supabaseinside the/specfolder which will generate the Docusaurus pages - run
npm run buildto make sure the build is working - submit your PR