Solarflare

Non-Public Schema Support

Our initial release of Solarflare allowed you to make tables in your Postgres public schema live and accessible directly from frontend React components.

We now support exposing tables from any schema in Postgres. You can write useTable('posts') which defaults to the public.posts table, or useTable('my_schema.posts') to target a table in any other schema.

index.tsx
import { createSolarflare, type DB } from '@solarflare/client'

const { useTable } = createSolarflare<DB>()

const Todos = () => {
    const { data, isLoading } = useTable("custom_schema.todos");

    if (isLoading) return <div>Loading...</div>

    return (
        <div>
            {data.map(todo => <Todo key={todo.id} todo={todo}>)}
        </div>
    )
}
Back to Changelog
Backed by
Made in San Francisco + London