Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 942 Bytes

UPGRADING.md

File metadata and controls

22 lines (16 loc) · 942 Bytes

1.0.0 to 2.0.0

The 2.0.0 release is a component with no local state and consequently, no methods to show and hide the component. Instead, you need to use the isActive prop to control the visibility of the component.

Additionally, the functionality of the dissmissAfter prop is changed. Instead of the component dismissing the notification using local state, it will run a callback event onDismiss after the time specified in dismissAfter.

For example, if you want your notification to dismiss after two seconds:

var props = {
  isActive: this.state.isNotficationActive,
  message: 'This is a notification',
  action: 'Dismiss',
  dismissAfter: 2000,
  onDismiss: this.hideMyNotification,
  onClick: this.hideMyNotification
}

<Notfication  {...props} />

If you have questions, please feel free to create an issue on GitHub or message me (@pburtchaell) on the Reactiflux Slack community.