All Projects → tmm → react-supabase

tmm / react-supabase

Licence: MIT license
React Hooks library for Supabase

Programming Languages

typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to react-supabase

supabase flutter
Using Supabase in Flutter
Stars: ✭ 38 (-77.38%)
Mutual labels:  supabase, supabase-client
snake-design
🐍 a react component library based React hooks
Stars: ✭ 33 (-80.36%)
Mutual labels:  hooks
use-query-string
🆙 A React hook that serializes state into the URL query string
Stars: ✭ 50 (-70.24%)
Mutual labels:  hooks
coconat
🍥 StarterKit Builder for rocket-speed App creation on 🚀 React 17 + 📙 Redux 4 + 🚠 Router 5 + 📪 Webpack 5 + 🎳 Babel 7 + 📜 TypeScript 4 + 🚔 Linters 23 + 🔥 HMR 3
Stars: ✭ 95 (-43.45%)
Mutual labels:  hooks
react-zeno
The React companion to Zeno, a Redux implementation optimized for Typescript.
Stars: ✭ 14 (-91.67%)
Mutual labels:  hooks
no-redux
⚛️ 🎣 Experimenting with using hooks and context instead of Redux
Stars: ✭ 79 (-52.98%)
Mutual labels:  hooks
hookuspocus
hooks for all the functions!
Stars: ✭ 60 (-64.29%)
Mutual labels:  hooks
react-use-observer
Performant react hooks for WebApi Observers, useResizeObserver, useInteractionObserver, useMutationObserver
Stars: ✭ 19 (-88.69%)
Mutual labels:  hooks
statery
Surprise-Free State Management! Designed for React with functional components, but can also be used with other frameworks (or no framework at all.)
Stars: ✭ 28 (-83.33%)
Mutual labels:  hooks
supabase-ui-svelte
Supabase authentication UI for Svelte
Stars: ✭ 83 (-50.6%)
Mutual labels:  supabase
jedisdb
redis like key-value state management solution for React
Stars: ✭ 13 (-92.26%)
Mutual labels:  hooks
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (-85.71%)
Mutual labels:  hooks
roover
🐱 A lightweight audio library for React apps.
Stars: ✭ 70 (-58.33%)
Mutual labels:  hooks
Simplified-JNA
Multi-threaded JNA hooks and simplified library access to window/key/mouse functions.
Stars: ✭ 30 (-82.14%)
Mutual labels:  hooks
react-use-redux
Alternative Redux bindings with upcoming React hooks
Stars: ✭ 31 (-81.55%)
Mutual labels:  hooks
mey
A react package that exports hooks for handling the request lifecycle.
Stars: ✭ 18 (-89.29%)
Mutual labels:  hooks
use-redux-hook
A simple react hook to get access to redux store
Stars: ✭ 13 (-92.26%)
Mutual labels:  hooks
angulareact
A way to seamlessly integrate React and AngularJS
Stars: ✭ 17 (-89.88%)
Mutual labels:  hooks
use-detect-print
A react hook to detect when a page is being printed
Stars: ✭ 55 (-67.26%)
Mutual labels:  hooks
scala-basic-skeleton
Starting point if you want to bootstrap a project in Scala
Stars: ✭ 16 (-90.48%)
Mutual labels:  hooks

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 <p>Loading...</p>
  if (error) return <p>Oh no... {error.message}</p>

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

License

The MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].