You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Animated: useNativeDriver was not specified" warning since React Native 0.62 #339
Reacted by Luke Lopez, Laura Beatris, João Marcos M. A. Mruk, FelixGalloCruz, 요리하는개발자, Samuel Mariña, Nantris, Sai Nyan Htay, Saim Fayyaz, 이재하 and 10 more
Reacted by 요리하는개발자, Victor Hermes and wicak
Reacted by SiddhiBlackLotus, Minji Kang, Victor Hermes, Layne Bernardot and Dilnawaz Khan
I am also facing the same issue. Manual change works but this warning will always occur every time when the application is rebuilt ( i.e. node_modules are installed again ). Same issue will occur when publishing the app.
Is there any way we can suppress the warning till the author fixes this issue?
I forwarded a message to the author requesting the error correction merge so that this error no longer appears. Now it's time to wait, as they take too long to make changes.
I believe that you could fork and send your correction to your app because it would be easier and faster, then when you launch the official correction you change.
As @ChronSyn mentioned, you just paste the patch in any file. But since, it sets the prototype for a class, it's better to put it in an separate file as module an load it in some top level component like App so that it gets loaded only once(not that it makes much difference, but it feels better this way to load it). You don't need to put this patch in every file. Also do add a TODO comment to remove this patch once the PRs are merged and you update to the fixed version.
I am trying to use this in Typescript but the monkey patch doesn't seem to be working. Any fix that can help in typescript? @mannyhappenings@manishsharma004@ChronSyn
Errors being:
Property 'animateButton' does not exist on type 'ActionButton'.
Property 'reset' does not exist on type 'ActionButton'
Property 'mounted' does not exist on type 'ActionButton', etc.
import ActionButton from 'react-native-circular-action-menu';
import { Animated } from 'react-native';
/**
CustomActionButton implementa el uso del componente ActionButton inyectando funciones de correción de errores
*/
export default class CustomActionButton extends ActionButton {
animateButton() {
if (this.state.active) {
this.reset();
return;
}
Activity
blindibrasil commentedon Apr 20, 2020
I think the solution to the problem will be to implement the following change to the ActionButton.js file;
sunkakar commentedon Jun 16, 2020
I have the same issue!
IgorThierry commentedon Jun 25, 2020
I have the same issue!
ytr0 commentedon Jun 29, 2020
This works.
Sharvin26 commentedon Jul 8, 2020
I am also facing the same issue. Manual change works but this warning will always occur every time when the application is rebuilt ( i.e. node_modules are installed again ). Same issue will occur when publishing the app.
Is there any way we can suppress the warning till the author fixes this issue?
blindibrasil commentedon Jul 8, 2020
I forwarded a message to the author requesting the error correction merge so that this error no longer appears. Now it's time to wait, as they take too long to make changes.
I believe that you could fork and send your correction to your app because it would be easier and faster, then when you launch the official correction you change.
W8jonas commentedon Jul 22, 2020
It's working fine !! But the author should consider implementing these changes in the new version.
qiqo commentedon Jul 26, 2020
there's a pull request to fix this since April, I hope the author is all okay and could merge it for the fix.
mannyhappenings commentedon Aug 2, 2020
Until the PRs get merged, monkey patching the class works,
Hope this helps to some people annoyed by that warning
Mazinkam commentedon Oct 1, 2020
How is this "monkey patch" used?
ChronSyn commentedon Oct 31, 2020
You paste the code at the top of the file for the component where you're using the action button
manishsharma004 commentedon Dec 31, 2020
As @ChronSyn mentioned, you just paste the patch in any file. But since, it sets the prototype for a class, it's better to put it in an separate file as module an load it in some top level component like App so that it gets loaded only once(not that it makes much difference, but it feels better this way to load it). You don't need to put this patch in every file. Also do add a
TODOcomment to remove this patch once the PRs are merged and you update to the fixed version.ConstantTime commentedon Jan 25, 2021
I am trying to use this in Typescript but the monkey patch doesn't seem to be working. Any fix that can help in typescript? @mannyhappenings @manishsharma004 @ChronSyn
Errors being:
dcjones1 commentedon Mar 2, 2021
@ConstantTime Here are some quick and dirty typings:
phatmann commentedon Aug 30, 2021
The workaround: disable the warning:
GustavoContreiras-Feegow commentedon Oct 15, 2021
yarn add -D replace-in-files-cliTip: Do this for any fix in any package you need to fix inside node_modules folder
phatmann commentedon Oct 15, 2021
@GustavoContreiras-Feegow Thanks for the info. Any reason you are not using patch-package?
mastermoo#339 방법에 따라 해결
aglitoiu commentedon Apr 7, 2022
https://www.npmjs.com/package/react-native-action-button-warnings-fixed
Feel free to try it and create issues there, maybe we will be able to keep it maintained by community, in absence of creator
jhusef-lopez commentedon Oct 3, 2022
I create a new component:
import ActionButton from 'react-native-circular-action-menu';
import { Animated } from 'react-native';
/**
CustomActionButton implementa el uso del componente ActionButton inyectando funciones de correción de errores
*/
export default class CustomActionButton extends ActionButton {
animateButton() {
if (this.state.active) {
this.reset();
return;
}
Animated.spring(this.state.anim, {
toValue: 1,
useNativeDriver: false,
duration: 250,
}).start();
this.setState({ active: true });
}
reset() {
Animated.spring(this.state.anim, {
toValue: 0,
useNativeDriver: false,
duration: 250,
}).start();
}
}
this work to me
warmfire540 commentedon Aug 5, 2025
I adjusted this in a fork - I'll accept other PRs as well: https://github.com/curious-cat-consulting/react-native-action-button/releases/tag/2.9.2
you'd use this version via
after removing the old one
let me know if I broke anything, I'll adjust..