Custom data

v1.0.0

Attach your own context to every bug report.

Attach arbitrary key/value pairs to every subsequent bug report:

tsx
import { BugScreen } from '@bugscreen/react-native';

// Replace the whole map:
BugScreen.setCustomData({ env: 'staging', buildType: 'debug', userTier: 'pro' });

// Set or remove a single key:
BugScreen.setCustomDataValue('userId', 'abc-123');
BugScreen.removeCustomData('userId');

// Merge a map without replacing existing keys:
BugScreen.addCustomData({ plan: 'pro', region: 'eu' });

// Remove all custom data:
BugScreen.clearCustomData();

Call any time after configure(). The values are read when the bug report screen opens and appear in the report's metadata.