Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Replace deprecated lifecycle hooks to UNSAFE ones
  • Loading branch information
Nilmanduil committed Aug 3, 2022
commit 6b7ed125b4f8482a2862b0a68e2f675190b1781a
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