Skip to content

Commit

Permalink
Replace deprecated lifecycle hooks to UNSAFE ones
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilmanduil committed Aug 3, 2022
1 parent 381ecc3 commit 6b7ed12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ export default class Swipeable extends PureComponent {
rightButtonsOpen: false
};

componentDidMount() {
UNSAFE_componentDidMount() {
const {onPanAnimatedValueRef, onRef} = this.props;

onRef(this);
onPanAnimatedValueRef(this.state.pan);
}

componentWillUnmount() {
UNSAFE_componentWillUnmount() {
this._unmounted = true;
}

Expand Down

0 comments on commit 6b7ed12

Please sign in to comment.