Use this file to discover all available pages before exploring further.
This SDK is being phased out. For new integrations, we recommend using the JavaScript Server SDK with local resolve, which provides better performance and reliability. Only use this SDK when client-side context modifications are required that the local resolve SDK cannot support.
The Confidence JavaScript SDK provides feature flag evaluation for web browser applications. Flags resolve once according to the evaluation context, and values read from a local cache for fast access.
import { Confidence } from '@spotify-confidence/sdk';// Initialize Confidenceconst confidence = Confidence.create({ clientSecret: 'your-client-secret',});// Set the evaluation contextconfidence.setContext({ targeting_key: 'user-123', country: 'US',});// Subscribe to flag updates and evaluateawait confidence.activate();// Evaluate a flagconst value = confidence.getFlag('my-feature-flag', false);console.log('Flag value:', value);
The standalone React SDK is being phased out. For new React integrations, we recommend using the JavaScript Server SDK with local resolve and its React hooks, which provides better performance and reliability.
The Confidence React SDK provides React hooks and components for feature flag evaluation. Built on top of the JavaScript SDK, it offers a React-native developer experience.