rafaelmotta / react-native-progress-bar-animated

📊 Simple, customizable and animated progress bar for React Native
52 stars 39 forks source link

Set native driver to false. #21

Open johfarrell opened 3 years ago

johfarrell commented 3 years ago

(WARN useNativeDriver was not specified. This is a required option and must be explicitly set to true or false) lead to random force close and apps reload in some cases.

jtalz commented 3 years ago

I encountered this as well. It seems that it hasn't yet been changed in the repo. Thanks.

MasIzzudin commented 3 years ago

So, any update for this warning issue?

johfarrell commented 3 years ago

The repo owner haven't merge my work yet. Still waiting for response

denisvely commented 2 years ago

@rafaelmotta Please merge this one.

itamarbareket commented 2 years ago

Hi just as a quick fix you can create this file as patches/react-native-progress-bar-animated+1.0.6.patch in your root repo dir and set it's value to

diff --git a/node_modules/react-native-progress-bar-animated/src/AnimatedProgressBar.js b/node_modules/react-native-progress-bar-animated/src/AnimatedProgressBar.js
index 8ba19be..4963b58 100644
--- a/node_modules/react-native-progress-bar-animated/src/AnimatedProgressBar.js
+++ b/node_modules/react-native-progress-bar-animated/src/AnimatedProgressBar.js
@@ -61,6 +61,7 @@ class ProgressBar extends React.Component {
       easing: Easing[this.props.barEasing],
       toValue: toValue > 0 ? toValue : 0,
       duration: this.props.barAnimationDuration,
+      useNativeDriver: false
     }).start();
   }

then run yarn patch-package to fix that.

You can also add to you package.json for a more automatic workflow:

 "scripts": {
+  "postinstall": "patch-package"
 }