Beyond Next.js, the docs maintain quickstarts for Expo (React Native) and TanStack Start. The core stays identical; only the server route shape is framework-native.
TanStack Start:
- pnpm create @tanstack/start@latest my-ai-app, then pnpm add ai @ai-sdk/react zod.
- AI_GATEWAY_API_KEY in .env at the project root.
- Server functions return the Response from createUIMessageStreamResponse the same way a Next.js route does. The client uses useChat from @ai-sdk/react with DefaultChatTransport.
Expo:
- There is a dedicated Expo quickstart in the docs nav. The ai core works in React Native; streaming uses fetch-based transport, which Expo supports.
- Keys must come from a backend route, never bundled into the app. Expo apps should talk to your API server (which holds the provider key), not call providers directly from the device.
- Watch bundle size: import only what you use. The full provider set is tree-shakeable, but importing every provider package bloats the native bundle.
General rules for non-Next frameworks:
1. The wire protocol does not change. Any server that returns a UI message stream works with any useChat client.
2. Node 22+ baseline still applies to the server side.
3. Env key handling is per-framework (.env, runtime config), but the rule is universal: keys stay server-side.
4. When a framework quickstart lags the latest ai major, pin to the versions the quickstart was tested with and upgrade deliberately.