MCPcopy Index your code
hub / github.com/awkweb/react-supabase

github.com/awkweb/react-supabase @0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.0 ↗ · + Follow
20 symbols 92 edges 45 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Introduction

react-supabase is a React Hooks library for Supabase.

Visit the docs site for more info.

Installation

yarn add react-supabase @supabase/supabase-js
# or
npm install --save react-supabase @supabase/supabase-js

Quick Start

Create a Supabase client and pass it to the Provider:

import { createClient } from '@supabase/supabase-js'
import { Provider } from 'react-supabase'

const client = createClient('https://xyzcompany.supabase.co', 'public-anon-key')

const App = () => (
  <Provider value={client}>
    <YourRoutes />
  </Provider>
)

Now every component inside and under the Provider can use the Supabase client and hooks:

import { useRealtime } from 'react-supabase'

const Todos = () => {
  const [result, reexecute] = useRealtime('todos')

  const { data, fetching, error } = result

  if (fetching) return 

Loading...


  if (error) return 

Oh no... {error.message}



  return (
    <ul>
      {data.map((todo) => (
        <li key={todo.id}>{todo.title}</li>
      ))}
    </ul>
  )
}

License

The MIT License.

Core symbols most depended-on inside this repo

useClient
called by 13
src/hooks/use-client.ts
useDelete
called by 3
src/hooks/data/use-delete.ts
useSelect
called by 3
src/hooks/data/use-select.ts
useUpdate
called by 3
src/hooks/data/use-update.ts
useRealtime
called by 3
src/hooks/realtime/use-realtime.ts
useInsert
called by 2
src/hooks/data/use-insert.ts
useUpsert
called by 2
src/hooks/data/use-upsert.ts
useFilter
called by 2
src/hooks/data/use-filter.ts

Shape

Function 17
Class 2
Method 1

Languages

TypeScript100%

Modules by API surface

docs/pages/_document.tsx3 symbols
src/hooks/realtime/use-realtime.ts2 symbols
test/utils.tsx1 symbols
src/hooks/use-client.ts1 symbols
src/hooks/realtime/use-subscription.ts1 symbols
src/hooks/data/use-upsert.ts1 symbols
src/hooks/data/use-update.ts1 symbols
src/hooks/data/use-select.ts1 symbols
src/hooks/data/use-insert.ts1 symbols
src/hooks/data/use-filter.ts1 symbols
src/hooks/data/use-delete.ts1 symbols
src/hooks/auth/use-signup.ts1 symbols

For agents

$ claude mcp add react-supabase \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact