comments ftw

This commit is contained in:
David Baker 2020-01-25 21:30:42 +00:00
parent f851f976e7
commit 086e43e584

View file

@ -24,6 +24,10 @@ export default class ToastContainer extends React.Component {
super();
this.state = {toasts: ToastStore.sharedInstance().getToasts()};
// Start listening here rather than in componentDidMount because
// toasts may dismiss themselves in their didMount if they find
// they're already irrelevant by the time they're mounted, and
// our own componentDidMount is too late.
ToastStore.sharedInstance().on('update', this._onToastStoreUpdate);
}