Skip to main content

react-native-healthx

Unified cross-platform health data API for React Native

🔗

Unified API

Single API for both iOS HealthKit and Android Health Connect. Write once, run everywhere.

📘

TypeScript First

Comprehensive TypeScript types for all health data structures and API methods.

😴

Sleep Tracking

Read sleep sessions, stages (light, deep, REM), and aggregated statistics.

Expo Support

Config plugin automatically sets up native configuration for both platforms.

🚀

Promise-based

Modern async/await API that integrates seamlessly with React Native.

📱

Platform-aware

Gracefully handles platform differences and limitations.

Simple to Use

Initialize once, request permissions, and start accessing health data. The API is designed to be intuitive and follows React Native conventions.

View Documentation
import HealthX from 'react-native-healthx';

// Initialize
await HealthX.initialize();

// Get sleep data
const sessions = await HealthX.sleep.getSessions({
  startDate: '2024-01-01T00:00:00Z',
  endDate: '2024-01-31T23:59:59Z',
});

console.log(`Found ${sessions.length} sessions`);