Store-backed hooks
useQubee and useQubeeContext read the core store through useSyncExternalStore: a new snapshot per write, no tearing, and a server snapshot, so client components render on the server too.
@qubeejs/react connects @qubeejs/core to React. useQubeeList keeps a list's query in the page URL, through your router, and useQubeeQuery fetches the page it asks for. A hook gives a component its own query builder, and a provider shares one across a subtree.
These pages cover only what the adapter adds. Drivers, filters, the builder API and the list layer — defineList, its params, its hrefs — are documented once, in the qubeejs core docs ↗.

useQubee and useQubeeContext read the core store through useSyncExternalStore: a new snapshot per write, no tearing, and a server snapshot, so client components render on the server too.
useQubeeList reads a list from the page URL and writes it back through your router — browser history, React Router, TanStack Router or the Next.js App Router: at most one navigation per change, a draft that keeps inputs responsive while a search debounces, and a back button that simply works.
useQubeeQuery fetches the page a list asks for, once per navigation, through fetch or a fetcher of yours. TanStack Query and SWR integrations ship as entry points, and fetchQubeePage runs on the server.
9.3 kB minified for the whole adapter, measured with esbuild when this site was built. Zero runtime dependencies, and the core's drivers still tree-shake.
Wrap the app in the adapter of your router. Every list below it calls useQubeeList without naming a router, and useQubeeQuery fetches the page it asks for.
| package | min / gzip |
|---|---|
| @qubeejs/react | 9.3 kB / 3.8 kB |
| with @qubeejs/core (1 driver) | 28.6 kB / 9.3 kB |
Measured with esbuild when this site was built: minified ES2022, React external.
import { BrowserAdapter } from '@qubeejs/react';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { App } from './app';
const root = document.getElementById('root');
if (!root) {
throw new Error('index.html has no #root element');
}
// Every list below the provider reads and writes the URL through browser history.
createRoot(root).render(
<StrictMode>
<BrowserAdapter>
<App />
</BrowserAdapter>
</StrictMode>
);import { ReactRouterAdapter } from '@qubeejs/react/react-router';
import { createBrowserRouter, Outlet, RouterProvider } from 'react-router';
import { ArticlesPage } from './react-router-articles';
/** The root route: every list under it reads and writes the URL through React Router. */
function Root() {
return (
<ReactRouterAdapter>
<Outlet />
</ReactRouterAdapter>
);
}
const router = createBrowserRouter([
{
children: [{ element: <ArticlesPage />, path: 'articles' }],
element: <Root />,
path: '/',
},
]);
export function App() {
return <RouterProvider router={router} />;
}import { TanStackRouterAdapter } from '@qubeejs/react/tanstack-router';
import { createRootRoute, Outlet } from '@tanstack/react-router';
/** The root route: every list under it reads and writes the URL through TanStack Router. */
export const rootRoute = createRootRoute({
component: () => (
<TanStackRouterAdapter>
<Outlet />
</TanStackRouterAdapter>
),
});import { NextAdapter } from '@qubeejs/react/next';
import type { ReactNode } from 'react';
import { Providers } from './providers';
/**
* The root layout, a Server Component. It renders the adapter provider directly: the entry is a
* client module, and the provider takes only serialisable props.
*/
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>
<NextAdapter>
<Providers>{children}</Providers>
</NextAdapter>
</body>
</html>
);
}The adapter documents nothing the core already documents. Query semantics are the same in every framework binding — read them once, over there.
@qubeejs/core, its reference page is in the core docs — not here.