ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.45k stars 580 forks source link

Warning useNativeDriver and componentWillReceiveProps how to solve? #398

Closed Larva02 closed 4 years ago

Larva02 commented 4 years ago

image

Today (May 14th) I used this component for the first time,What went wrong?

LuongTruong commented 4 years ago

This has been mentioned quite a lot of time. Did you make any process, @ascoders ? I face the same issue

GoktuqCan commented 4 years ago

v3.0.0 has commit by @petertravelchime about useNativeDriver but warning still showing.

ArtemKolichenkov commented 4 years ago

Hey guys, I'm a new maintainer for this repo and I'm trying to resolve most common issues right now. Read more in #396. It still might take time to make into release, but at least I can say that next release is soon (like a week or so). I will notify people here to update once the new version is out.

@GoktuqCan yeah, technically it is in the repo already, but it was not released to npm. So next version will have it.

Larva02 commented 4 years ago

I have updated to 3.0.1 and found that this problem has been solved,thanks @ArtemKolichenkov

dl-husky73 commented 4 years ago

I having upgraded to 3.0.1 and I am getting the Animated: useNativeDriver was not specified. I am trying to catch up on these notes, but wondering did anyone get rid of the useNativeDriver warning?

bluenex commented 3 years ago

I having upgraded to 3.0.1 and I am getting the Animated: useNativeDriver was not specified. I am trying to catch up on these notes, but wondering did anyone get rid of the useNativeDriver warning?

I just upgraded the lib to 3.0.1 today and still get the warning

Warning
Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`
function shouldUseNativeDriver(
  config: {...AnimationConfig, ...} | EventConfig,
): boolean {
  if (config.useNativeDriver == null) {
    console.warn(
      'Animated: `useNativeDriver` was not specified. This is a required ' +
        'option and must be explicitly set to `true` or `false`',
    );
  }
...
pxpeterxu commented 3 years ago

If you're still getting the warning, check that it's coming from this library! It's possible that some other library is causing it.

Also, if you're using yarn.lock or have a package-lock.json, take a look at that file and see the version of react-native-image-pan-zoom. Make sure you're using version 2.1.12. Likewise, if react-native-image-pan-zoom is in your package.json, make sure it's marked as "react-native-image-pan-zoom": "^2.1.12"