Open2

supabseメモ

プログラマぽい何かを名乗る生物プログラマぽい何かを名乗る生物

supabseのauth, databaseを利用する。
まずはauthから。
https://supabase.com/docs/guides/auth/quickstarts/react

npm install @supabase/supabase-js @supabase/auth-ui-react @supabase/auth-ui-shared

supabase-jsは名前的にtypescript対応してるか不安だったが、普通に公式に書いてあった。

supabase-js has TypeScript support for type inference, autocompletion, type-safe queries, and more.

With TypeScript, supabase-js detects things like not null constraints and generated columns. Nullable columns are typed as T | null when you select the column. Generated columns will show a type error when you insert to it.

supabase-js also detects relationships between tables. A referenced table with one-to-many relationship is typed as T[]. Likewise, a referenced table with many-to-one relationship is typed as T | null.

https://supabase.com/docs/reference/javascript/typescript-support

supabase/auth-ui-react ,supabase/auth-ui-shared についても調べようかと思ったが、今年の1月に出された記事だと使えてるぽそうなのでインストールすることにした。

https://zenn.dev/sc30gsw/articles/56e07707a4f55b