robcalcroft / react-native-in-app-notification

:bell: Customisable in-app notification component for React Native
MIT License
270 stars 78 forks source link

InAppNotificationProvider show by default a notification #29

Open CocoJr opened 5 years ago

CocoJr commented 5 years ago

Hi,

When i wrap my application with the Provider, i have a notification showed by default. This is due to the default props of the DefaultNotificationBody:

DefaultNotificationBody.defaultProps = {
  title: 'Notification',
  message: 'This is a test notification',
  vibrate: true,
  isOpen: false,
  iconApp: null,
  icon: null,
  onPress: () => null,
  onClose: () => null,
};

Has to be:

DefaultNotificationBody.defaultProps = {
  title: null,
  message: null,
  vibrate: true,
  isOpen: false,
  iconApp: null,
  icon: null,
  onPress: () => null,
  onClose: () => null,
};

This is happening with expo and android. But visibly same problem with ios.

Thx.