Skip to content

Commit 4ba3c8a

Browse files
authored
Merge pull request #9 from TchiRubick/master
Deprecated string ref.
2 parents db41f07 + ec4598c commit 4ba3c8a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class NotificationAlert extends React.Component {
1515
};
1616
this.onDismiss = this.onDismiss.bind(this);
1717
this.notificationAlert = this.notificationAlert.bind(this);
18+
this.refNotification = React.createRef();
1819
}
1920
// to stop the warning of calling setState of unmounted component
2021
componentWillUnmount() {
@@ -179,7 +180,7 @@ class NotificationAlert extends React.Component {
179180
render() {
180181
return React.createElement(
181182
"div",
182-
{ ref: "notifications" },
183+
{ ref: this.refNotification },
183184
this.showAllNotifications("tl"),
184185
this.showAllNotifications("tc"),
185186
this.showAllNotifications("tr"),

0 commit comments

Comments
 (0)