Skip to content
Introduction/Installation

Installation

Install the adapter together with the core. The core is a peer dependency: you import drivers, defineList and the list params from it directly, so your app owns its version.

Terminal window
npm install @qubeejs/react @qubeejs/core
Package Version Why
react ^18.3.0 or ^19.0.0 The hooks use useSyncExternalStore, useTransition, useState, useRef, useEffect and context — stable in both majors.
@qubeejs/core ^1.4.1 1.3 added QubeeConfig.baseUrl and the list layer — defineList, readListState, buildListHref, buildListRequest — that the adapter builds on; 1.4 lets a list declare an input, which useQubeeList passes through, and 1.4.1 tells every list without one apart from those with one.

Type declarations ship with the package; there is no @types/… package to add.

  • One main entry point, and one per integration. The hooks, the providers and their types come from @qubeejs/react. Each router adapter and each fetching integration is an entry point of its own — @qubeejs/react/react-router, @qubeejs/react/tanstack-router, @qubeejs/react/next, @qubeejs/react/tanstack-query, @qubeejs/react/swr — with its library as an optional peer dependency, so you install only what you import. @qubeejs/react/fetch holds fetchQubeePage, for servers, loaders and scripts.
  • ES modules and CommonJS, with source maps and sideEffects: false. Load the package one way throughout an app: the two formats are separate copies, so a provider reached with require is not seen by a hook reached with import.
  • Zero runtime dependencies. React and the core are peers; nothing else is installed.
  • A client boundary built in. The entry points that export hooks or components are marked 'use client', so a Next.js Server Component can import the package’s components without a wrapper file; @qubeejs/react/fetch and @qubeejs/react/tanstack-query are not, so a Server Component can call what they export. Bundlers that have no client boundary leave the marker alone; Rollup-based ones, Vite among them, may print a MODULE_LEVEL_DIRECTIVE notice as they do, which is harmless.

Import the one driver you use — STRAPI_DRIVER, LARAVEL_DRIVER — rather than the DRIVERS registry, so the other seventeen tree-shake out. The core docs measure the difference: Bundle size ↗.

@qubeejs/react follows Semantic Versioning. Every release is listed in the changelog.