mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 01:40:13 -04:00
69ce915a9e
This PR renames all `SUPABASE_PUBLISHABLE_OR_ANON_KEY` env vars into `SUPABASE_PUBLISHABLE_KEY` to make the new API keys default. This is in coordination with the rest of the docs. I've also cleaned up the `blocks/vue` package from unused files. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Breaking Changes** * Public environment variable names renamed from PUBLISHABLE_OR_ANON_KEY → PUBLISHABLE_KEY across all framework integrations; update your environment configs. * **Documentation** * All framework guides, .env examples and registry docs updated to use the new variable names. * **Chores** * Cleaned up UI registry/templates: some example Vue registry items and autogenerated registry artifacts were removed or simplified. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
---
|
|
title: Supabase Client Libraries
|
|
description: Supabase client for React Single Page Applications
|
|
---
|
|
|
|
## Installation
|
|
|
|
<BlockItem name="supabase-client-react" description="Supabase Client for React SPA" />
|
|
|
|
## Folder structure
|
|
|
|
<RegistryBlock itemName="supabase-client-react" />
|
|
|
|
## Usage
|
|
|
|
This block installs a Supabase client for connecting your React project to Supabase. It's designed for use in client-side components.
|
|
|
|
If you've already set up a Supabase client in your project, you can just continue using that existing setup.
|
|
|
|
### Getting started
|
|
|
|
After installing the block, you'll have the following environment variables in your `.env.local` file:
|
|
|
|
```env
|
|
VITE_SUPABASE_URL=
|
|
VITE_SUPABASE_PUBLISHABLE_KEY=
|
|
```
|
|
|
|
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true&connectTab=frameworks&framework=react&using=vite&with=supabasejs) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).
|
|
|
|
- If you're using a local instance of Supabase, you can find these values by running `supabase start` or `supabase status` (if you already have it running).
|
|
|
|
## Further reading
|
|
|
|
- [Generating TypeScript types for your client](https://supabase.com/docs/guides/api/rest/generating-types)
|