venits/react-native-movable-view

componentWillMount was deprecated in 2018

spinoza1791 opened this issue · 0 comments

Simple change needed to MovableView.js: componentWillUnmount was deprecated in 2018

componentWillMount() {
if (typeof this.props.onMove === 'function')
this.state.pan.addListener((values) => this.props.onMove(values));
}

Replace with:

componentDidMount() {
if (typeof this.props.onMove === 'function')
this.state.pan.addListener((values) => this.props.onMove(values));
}