-
Notifications
You must be signed in to change notification settings - Fork 110
this.container not working #123
Copy link
Copy link
Open
Description
I got can not read container of undefined. below is my snippet
import { ToastContainer, ToastMessage } from 'react-toastr';
const ToastMessageFactory = React.createFactory(ToastMessage.animation);
addAlert () {
this.container.success(
"my-title",
"my-fascinating-toast-message", {
timeOut: 5000,
extendedTimeOut: 3000
});
}
render() {
return (<div>
<ToastContainer ref={(input) => {this.container = input;}}
toastMessageFactory={ToastMessageFactory}
className="toast-top-right"
preventDuplicates="true" />
<button onClick={this.addAlert}>Add Toast</button>
</div>);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels