Optionalokcollect: OkCollectA promise that resolves with the user and location data
import * as OkHi from 'react-native-okhi';
// Basic usage with defaults
const result = await OkHi.startDigitalAddressVerification();
console.log('Address:', result.location.formattedAddress);
console.log('Location ID:', result.location.id);
import * as OkHi from 'react-native-okhi';
import type { OkCollect } from 'react-native-okhi';
// With custom styling
const config: OkCollect = {
style: {
color: '#FF5722',
logo: 'https://example.com/logo.png',
},
configuration: {
streetView: true,
},
};
const result = await OkHi.startDigitalAddressVerification(config);
import * as OkHi from 'react-native-okhi';
// Start verification on previously created address
const locationId: string = await fetchLocationIDFromMyDB()
const result = await OkHi.startDigitalAddressVerification({
locationId: locationId,
});
Optional configuration for styling and behavior