Files
supabase/web
Tom Meagher a6aec9b055 docs: add react-supabase
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.
2021-05-04 13:03:41 -04:00
..
2021-05-04 13:03:41 -04:00
2021-03-18 11:45:27 +08:00
2021-05-04 10:30:55 +09:00
2021-03-10 17:20:25 +08:00
2021-03-31 22:53:30 +08:00
2021-03-24 21:54:39 +08:00
2021-03-31 22:06:03 +08:00
2021-04-15 13:20:30 +08:00
2021-02-26 09:08:50 +05:30

Supabase Docs

Contributing to the specs

  • cd /web/spec/
  • run make which will pull the latest TSDoc with your updates
  • add your comments to supabase.yml | postgrest.yml | gotrue.yml | realtime.yml
  • run npm run gen:supabase inside the /spec folder which will generate the Docusaurus pages
  • run npm run build to make sure the build is working
  • submit your PR