React-native-gifted-chat: Animated.event now requires a second argument for options

Created on 22 Sep 2020  路  7Comments  路  Source: FaridSafi/react-native-gifted-chat

Issue Description

When We need to display a message with an image, the app shows a warning about the issue.

Animated.event now requires a second argument for options

I guess, react-native-gifted-chat uses this react-native-lightbox lib. Now UseNativeDriver is a required prop for Animated
Unfortunately, the original library seems to be out of maintenance.

Steps to Reproduce / Code Snippets

Simulator Screen Shot - iPhone 11 - 2020-09-22 at 16 11 58

Additional Information

  • Nodejs version: v13.5.0
  • React version: 16.13.1
  • React Native version: 0.63.2
  • react-native-gifted-chat version: 0.16.3
  • Platform(s) (iOS, Android, or both?): Both
  • TypeScript version: 3.8.3
wontfix

Most helpful comment

Hi guys and @FaridSafi, i worked this around. I implemented my own component, i used this package
react-native-image-modal

and the component look like this.

 const renderMessageImage = (props) => {
    return (
      <View
        style={{
          borderRadius: 15,
          padding: 2,
        }}
      >
        <ImageModal
          resizeMode="contain"
          style={{
            width: 200,
            height: 200,
            padding: 6,
            borderRadius: 15,
            resizeMode: "cover",
          }}
          source={{ uri: props.currentMessage.image }}
        />
      </View>
    );
  };

hope this would be helpful.

All 7 comments

I am also getting this warning. It is safe to ignore it ?

same

Anyone fixed this?

hi guys and @FaridSafi, I guess, the original library seems to be out of maintenance so it will be great, if the react-native-gifted-chat team fork and modify react-native-lightbox with animated: { useNativeDriver: false }. I just ignore the warning.

Hi guys and @FaridSafi, i worked this around. I implemented my own component, i used this package
react-native-image-modal

and the component look like this.

 const renderMessageImage = (props) => {
    return (
      <View
        style={{
          borderRadius: 15,
          padding: 2,
        }}
      >
        <ImageModal
          resizeMode="contain"
          style={{
            width: 200,
            height: 200,
            padding: 6,
            borderRadius: 15,
            resizeMode: "cover",
          }}
          source={{ uri: props.currentMessage.image }}
        />
      </View>
    );
  };

hope this would be helpful.

I use patch-pakage to resolve the problem:
https://github.com/FaridSafi/react-native-gifted-chat/issues/1825#issuecomment-718463680

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings