Notification
Trigger notification haptic feedback with Haptics.notification().
Triggers a notification haptic feedback to communicate success, warning, or error. This corresponds to UINotificationFeedbackGenerator on iOS. On Android, it simulates the equivalent vibration effect.
Haptics.notification(type: NotificationFeedback): Promise<void>NotificationFeedback type
success: indicates that a task or action has completed successfully.warning: indicates that a task or action has produced a warning.error: indicates that a task or action has failed.
Example usage
import {NotificationFeedback} from '@mhpdev/react-native-haptics';
// Trigger a success notification
Haptics.notification('success');
// Trigger an error notification
Haptics.notification('error');Passing a value that is not one of the types above rejects the returned promise with E_INVALID_TYPE — see Troubleshooting.