From d48912b366e158d74a749f82d7288ee879934c74 Mon Sep 17 00:00:00 2001 From: Kibaek Kim Date: Thu, 24 Dec 2020 20:30:09 -0500 Subject: [PATCH] Update SwitchButton.js IAnimated: `useNativeDriver` was not specified. This is a required 'option and must be explicitly set to `true` or `false` --- SwitchButton.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SwitchButton.js b/SwitchButton.js index e80528d..6d34c2c 100644 --- a/SwitchButton.js +++ b/SwitchButton.js @@ -112,7 +112,8 @@ export default class SwitchButton extends Component { this.state.offsetX, { toValue: (((this.props.switchWidth || this.state.sbWidth) / 2) - 6) * dirsign, - duration: this.props.switchSpeedChange || 100 + duration: this.props.switchSpeedChange || 100, + useNativeDriver: true } ).start(); } @@ -122,7 +123,8 @@ export default class SwitchButton extends Component { this.state.offsetX, { toValue: 0, - duration: this.props.switchSpeedChange || 100 + duration: this.props.switchSpeedChange || 100, + useNativeDriver: true } ).start(); } @@ -215,4 +217,4 @@ const switchStyles = StyleSheet.create({ marginLeft: 2 } - }); \ No newline at end of file + });