maxs15 / react-native-modalbox

A <Modal/> component for react-native
MIT License
2.89k stars 505 forks source link

Animated.event now requires a second argument for options #316

Closed ghasemikasra39 closed 3 years ago

ghasemikasra39 commented 4 years ago

System info:

System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 64.73 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.8.4 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_232 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: ^4.8.0 => 4.8.0
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2
  npmGlobalPackages:
    *react-native*: Not Found
    "react-native-modalbox": "^2.0.0",

Reproduce:

<ModalBox
        useNativeDriver
        style={this.compileWrapperStyles()}
        {...defaultProps}
        isOpen={this.props.isVisible}>
        <View style={this.compileModalStyles()}>
          {this.props.backgroundImage && (
            <ImageBackground
              style={styles.backgroundImage}
              source={this.props.backgroundImage}
            />
          )}
          <View style={this.compileContentStyles()}>{children}</View>
        </View>
      </ModalBox>

Warning that I get:

backend.js:32 Animated.event now requires a second argument for options 
    in ModalBox (at Modal.tsx:57)
    in Modal (at LocationPermissionModal.tsx:16)
    in LocationPermissionModal (at ReceivePaperPlaneScreen.tsx:331)
    in ReceivePaperPlaneScreen (at ReceivePaperPlaneScreen.tsx:96)
    in ReceivePaperPlaneScreenHook (created by ConnectFunction)
    in ConnectFunction (at SceneView.tsx:98)
    in SceneView (at useDescriptors.tsx:125)
    in BottomTabView (at createBottomTabNavigator.tsx:41)
    in BottomTabNavigator (at PaperPlaneBottomTabNavigator.tsx:13)
    in PaperPlaneBottomTabNavigator (at SceneView.tsx:98)
    in SceneView (at useDescriptors.tsx:125)
    in CardContainer (at CardStack.tsx:497)
    in CardStack (at StackView.tsx:433)
    in KeyboardManager (at StackView.tsx:431)
    in Context.Consumer (at StackView.tsx:429)
    in StackView (at createStackNavigator.tsx:82)
    in StackNavigator (at AppStack.tsx:31)
    in AppStack (at SceneView.tsx:98)
    in SceneView (at useDescriptors.tsx:125)
    in CardContainer (at CardStack.tsx:497)
    in CardStack (at StackView.tsx:433)
    in KeyboardManager (at StackView.tsx:431)
    in Context.Consumer (at StackView.tsx:429)
    in StackView (at createStackNavigator.tsx:82)
    in StackNavigator (at AppContainer.tsx:48)
    in AppContainer (at App.tsx:80)
    in App (at renderApplication.js:45)
chahinaghrim commented 4 years ago

Faced the same issue! Can anyone help?

tanjwGit commented 4 years ago

312 or 318

maxs15 commented 3 years ago

Fix deployed in 2.0.1