-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useNativeDriver #105
useNativeDriver #105
Comments
+1 same problem... |
same problem here |
also same problem here :/ |
For those with this problem the resolution is simple, edit the functions |
@asasouza you don't happen to have the patch file to use? ;) |
@pke This is the patch file: index 7a0fc35..d409f70 100644
--- a/node_modules/react-native-actionsheet/lib/ActionSheetCustom.js
+++ b/node_modules/react-native-actionsheet/lib/ActionSheetCustom.js
@@ -24,8 +24,9 @@ class ActionSheet extends React.Component {
}
}
get styles () {
@@ -68,14 +69,16 @@ class ActionSheet extends React.Component {
Animated.timing(this.state.sheetAnim, {
toValue: 0,
duration: 250,
- easing: Easing.out(Easing.ease)
+ easing: Easing.out(Easing.ease),
+ useNativeDriver: true,
}).start()
}
_hideSheet (callback) {
Animated.timing(this.state.sheetAnim, {
toValue: this.translateY,
- duration: 200
+ duration: 200,
+ useNativeDriver: true,
}).start(callback)
} I created it by using the package patch-package, available in npm. |
Thanks, explanation is fine @asasouza! And thanks for the patch file. Next time I'll try it myself. There should be a way to attach such path files as temp fixes to issues here in GH :) |
@asasouza any idea how we could use https://patch-diff.githubusercontent.com/raw/beefe/react-native-actionsheet/pull/88.patch for patch-package? It says "unrecognised patch file" when I drop it into the patches folder. |
Same problem |
Yeah, I got this error as well, just use patch-package, Install
Then add "script": {
// ... other scripts
"postinstall": "patch-package" // <--- add this line
} to your Edit fileGo to Replace the _hideSheet (callback) {
Animated.timing(this.state.sheetAnim, {
toValue: this.translateY,
duration: 200,
useNativeDriver: true
}).start(callback)
} also the _showSheet = () => {
Animated.timing(this.state.sheetAnim, {
toValue: 0,
duration: 250,
easing: Easing.out(Easing.ease),
useNativeDriver: true
}).start()
} BonusOn patch it uprun Then you're all set. |
I released the fix to npm, read #131 |
Animated:
useNativeDriver
was not specified. This is a required option and must be explicitly set totrue
orfalse
in ActionSheet (at SignUp_1.tsx:107)
in SignUp_Name (at SceneView.tsx:98)
in SceneView (at useDescriptors.tsx:125)
in CardContainer (at CardStack.tsx:531)
in CardStack (at StackView.tsx:420)
in KeyboardManager (at StackView.tsx:418)
in Context.Consumer (at StackView.tsx:416)
in StackView (at createStackNavigator.tsx:67)
in StackNavigator (at navigation/index.tsx:27)
in LoginStackScreen (at SceneView.tsx:98)
in SceneView (at useDescriptors.tsx:125)
in CardContainer (at CardStack.tsx:531)
in CardStack (at StackView.tsx:420)
in KeyboardManager (at StackView.tsx:418)
in Context.Consumer (at StackView.tsx:416)
in StackView (at createStackNavigator.tsx:67)
in StackNavigator (at navigation/index.tsx:184)
in MainStackScreen (at navigation/index.tsx:215)
in AppNavigation (at App.tsx:27)
in App (at renderApplication.js:45)
react native 0.62
The text was updated successfully, but these errors were encountered: