Nativebase: Toast.show display a warning: Animated: `useNativeDriver` was not specified

Created on 15 May 2020  路  5Comments  路  Source: GeekyAnts/NativeBase

when execute show method, display a warning Animated: useNativeDriver was not specified.

my questions are, where? and how? i must declared the useNativeDriver: true o false, for working this

Thank!

Most helpful comment

This was an issue caused by RN 0.62, and they merged a fix for it here: #3109, but havent released it yet. Hopefully they do a 2.13.13 release soon with it.

For now, you can dismiss the warnings. If you want to suppress the warnings so they dont show up on your app, you can add this to your App.js:

// @TODO: This is to hide a Warning caused by NativeBase after upgrading to RN 0.62
import { YellowBox } from 'react-native'

YellowBox.ignoreWarnings([
  'Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`',
])
// ------- END OF WARNING SUPPRESSION

All 5 comments

This was an issue caused by RN 0.62, and they merged a fix for it here: #3109, but havent released it yet. Hopefully they do a 2.13.13 release soon with it.

For now, you can dismiss the warnings. If you want to suppress the warnings so they dont show up on your app, you can add this to your App.js:

// @TODO: This is to hide a Warning caused by NativeBase after upgrading to RN 0.62
import { YellowBox } from 'react-native'

YellowBox.ignoreWarnings([
  'Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`',
])
// ------- END OF WARNING SUPPRESSION

@daybreaker,

Excellent, work it perfect

Thanks

You can do this, it will work, but you will have to do it everytime the node module(nativebase) is installed.

Step 1: Go to this file: _node_modules\native-base\dist\src\basic\ToastConatiner.js_
Step 2: Search for _'Animated.timing'_ in the file.
Step 3: Add useNativeDriver: true inside the object passed as second argument, just after 'duration'.

tks @ritshpatidar , work done

It should be noted that this was fixed in v2.13.13 by 5c190746544293aa9c434c4831771f7e17043317.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elnygren picture elnygren  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

aloifolia picture aloifolia  路  3Comments

omerdn1 picture omerdn1  路  3Comments

natashache picture natashache  路  3Comments