Skip to content

Commit

Permalink
componentWillMount and componentWillReceiveProps are deprecated (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeldstein committed Aug 22, 2023
1 parent 899b780 commit 4315711
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ class Toast extends Component {

_toast = null;

componentWillMount = () => {
componentDidMount = () => {
this._toast = new RootSiblings(<ToastContainer
{...this.props}
duration={0}
/>);
};

componentWillReceiveProps = nextProps => {
componentDidUpdate = prevProps => {
this._toast.update(<ToastContainer
{...nextProps}
{...this.props}
duration={0}
/>);
};
Expand Down

0 comments on commit 4315711

Please sign in to comment.