React Native
Use Pulsabase in React Native with AsyncStorage-backed sessions.
Installation
Section titled “Installation”npm install @pulsabase/sdk @pulsabase/react-native @react-native-async-storage/async-storageimport { PulsaClient } from '@pulsabase/sdk';import { AsyncStorageAdapter } from '@pulsabase/react-native';
const pulsabase = new PulsaClient({ url: 'https://api.yourproject.pulsabase.io', clientKey: 'your-public-client-key', auth: { storage: new AsyncStorageAdapter(), },});The API is identical to the TypeScript SDK. The only difference is the storage adapter for persisting session tokens.
// All standard SDK methods workconst users = await pb.from('users').find();await pb.auth.signInWithPassword('user@example.com', 'securePassword');
// Realtime works over WebSocketpb.from('messages').subscribe('INSERT', (msg) => { // Update state});React Native Hooks
Section titled “React Native Hooks”You can use the same @pulsabase/react hooks:
npm install @pulsabase/reactimport { useQuery, useAuth } from '@pulsabase/react';// Same API as web React