Files
supabase/web/docs
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-02-16 11:53:56 +08:00
2021-03-22 19:44:23 +08:00
2021-02-16 11:53:56 +08:00
2021-03-30 00:25:04 +08:00
2021-03-11 16:38:56 +08:00
2021-03-30 18:43:42 -06:00