salvetron-react-native
React Native SDK for Salvetron - Real-time debugging console for React Native.

Requirements
| React Native | 0.73+ |
| Node.js | 18+ |
Installation
npm install @salve-software/salvetron-react-native react-native-nitro-modules
For iOS, install pods:
cd ios && pod install && cd ..
For Android, the package will auto-link.
Usage
Add the following code to your app's entry point (e.g., App.tsx):
import Salvetron from '@salve-software/salvetron-react-native';
if (__DEV__) {
Salvetron.connect({
host: '192.168.1.100',
port: 8765,
enableNetworkCapture: true,
});
}
Tip: Use localhost for iOS Simulator, or your Mac's local IP for physical devices.
API
Salvetron.connect(config?)
interface SalvetronConfig {
host?: string;
port?: number;
enableNetworkCapture?: boolean;
ignoredUrls?: RegExp[];
onConnect?: () => void;
onDisconnect?: () => void;
onError?: (error: Error) => void;
}
Salvetron.disconnect()
Closes the WebSocket connection.
Salvetron.isConnected()
Returns the current connection status.
Logging
Salvetron.log('General message');
Salvetron.debug('Debug info', { userId: 123 });
Salvetron.info('Info message');
Salvetron.warn('Warning message');
Salvetron.error('Error message');
Salvetron CLI
This SDK requires the Salvetron CLI running in your terminal to receive and display logs.
For full documentation, visit the main repository.
License
MIT