Prerequisites
Before installing the SDK, ensure you have:- Node.js 18+ or a compatible runtime
- npm, yarn, or pnpm for package management
- A SnackBase instance (local or hosted)
Installation
npm
npm
yarn
yarn
pnpm
pnpm
React Integration
If you’re using React, you’ll also need React installed as a peer dependency:npm
The React integration is exported from the same package (
@snackbase/sdk/react)
and requires React 18 or higher.Platform Support
The SDK works across multiple JavaScript environments:TypeScript Support
The SDK is written in TypeScript and includes full type definitions. No additional@types packages are needed.
Bundle Size
The SDK is optimized for production use:- Core SDK: 14.87 KB (gzipped)
- React Integration: 1.42 KB (gzipped)
- Total: 16.29 KB (gzipped)
Verification
After installation, verify the SDK is working:Next Steps
- Quick Start Guide - Get started with your first query
- Configuration - Explore all configuration options
- Authentication - Learn about authentication methods