Skip to main content

Remote Configuration

Manage app settings and feature flags remotely without code deployments.

Overview​

Remote Config allows you to control your app's behavior from the Resync dashboard. Change settings, toggle features, and update configurations instantly.

Use Cases​

  • Feature Flags - Enable/disable features remotely
  • API Endpoints - Update backend URLs
  • App Settings - Modify timeouts, limits, and thresholds
  • A/B Test Configuration - Control experiment parameters
  • Emergency Switches - Kill switches for problematic features

Getting Started​

1. Create Config in Dashboard​

  1. Go to Remote Config in your dashboard
  2. Click Add Config
  3. Set key-value pairs:
    ENABLE_NEW_UI: true
    API_TIMEOUT: 5000
    MAX_RETRIES: 3

2. Access in Your App​

import { useResync } from 'resync-react-native';

const { getConfig } = useResync();

// Get config values
const newUIEnabled = getConfig('ENABLE_NEW_UI');
const apiTimeout = getConfig('API_TIMEOUT');
const maxRetries = getConfig('MAX_RETRIES');

if (newUIEnabled) {
renderNewUI();
} else {
renderLegacyUI();
}

Config Types​

Boolean Flags​

const { getConfig } = useResync();

const darkModeEnabled = getConfig('ENABLE_DARK_MODE');
// Returns: true or false

Numeric Values​

const timeout = getConfig('REQUEST_TIMEOUT');
// Returns: 5000

String Values​

const apiUrl = getConfig('API_BASE_URL');
// Returns: "https://api.example.com"

Objects​

const apiSettings = getConfig('API_SETTINGS');
// Returns: { timeout: 5000, retries: 3, baseUrl: "..." }

Real-time Updates​

Subscribe to config changes:

Resync.subscribe(() => {
console.log('Config updated:');
updateAppSettings();
});

Best Practices​

  1. Set Defaults - Always provide fallback values
  2. Document Configs - Add descriptions in dashboard
  3. Test Changes - Use sandbox environment first
  4. Monitor Impact - Track metrics after config changes

Learn More​