ptomasroos / react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
https://www.npmjs.com/package/react-native-scrollable-tab-view
6.93k stars 2.28k forks source link

Check the render method of `AnimatedComponent`. #1131

Closed lexoops closed 4 months ago

lexoops commented 3 years ago

[error detail] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of AnimatedComponent.

This error is located at: in AnimatedComponent (at createAnimatedComponent.js:215) in ForwardRef(AnimatedComponentWrapper) (at react-native-scrollable-tab-view/index.js:253) in RCTView (at View.js:34) in View (at react-native-scrollable-tab-view/index.js:396) in ScrollableTabView (at home/index.js:92) in RCTView (at View.js:34) in View (at home/index.js:86) in RCTView (at View.js:34) in View (at createAnimatedComponent.js:165) in AnimatedComponent (at createAnimatedComponent.js:215) in ForwardRef(AnimatedComponentWrapper) (at src/index.tsx:85) in SafeAreaView (at home/index.js:26) in Home (at SceneView.tsx:122) in StaticContainer in StaticContainer (at SceneView.tsx:115) in EnsureSingleNavigator (at SceneView.tsx:114) in SceneView (at useDescriptors.tsx:153) in RCTView (at View.js:34) in View (at CardContainer.tsx:245) in RCTView (at View.js:34) in View (at CardContainer.tsx:244) in RCTView (at View.js:34) in View (at CardSheet.tsx:33) in ForwardRef(CardSheet) (at Card.tsx:573) in RCTView (at View.js:34) in View (at createAnimatedComponent.js:165) in AnimatedComponent (at createAnimatedComponent.js:215) in ForwardRef(AnimatedComponentWrapper) (at Card.tsx:555) in PanGestureHandler (at GestureHandlerNative.tsx:13) in PanGestureHandler (at Card.tsx:549) in RCTView (at View.js:34) in View (at createAnimatedComponent.js:165) in AnimatedComponent (at createAnimatedComponent.js:215) in ForwardRef(AnimatedComponentWrapper) (at Card.tsx:544) in RCTView (at View.js:34) in View (at Card.tsx:538) in Card (at CardContainer.tsx:206) in CardContainer (at CardStack.tsx:620) in RCTView (at View.js:34) in View (at Screens.tsx:84) in MaybeScreen (at CardStack.tsx:613) in RCTView (at View.js:34) in View (at Screens.tsx:54) in MaybeScreenContainer (at CardStack.tsx:495) in CardStack (at StackView.tsx:462) in KeyboardManager (at StackView.tsx:458) in RNCSafeAreaProvider (at SafeAreaContext.tsx:74) in SafeAreaProvider (at SafeAreaProviderCompat.tsx:42) in SafeAreaProviderCompat (at StackView.tsx:455) in GestureHandlerRootView (at GestureHandlerRootView.android.js:31) in GestureHandlerRootView (at StackView.tsx:454) in StackView (at createStackNavigator.tsx:87) in StackNavigator (at App.js:23) in EnsureSingleNavigator (at BaseNavigationContainer.tsx:409) in ForwardRef(BaseNavigationContainer) (at NavigationContainer.tsx:91) in ThemeProvider (at NavigationContainer.tsx:90) in ForwardRef(NavigationContainer) (at App.js:22) in RCTView (at View.js:34) in View (created by Portal.Host) in Portal.Host (created by Provider) in ThemeProvider (created by Provider) in LocaleProvider (created by Provider) in Provider (at App.js:21) in App (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in RCTView (at View.js:34) in View (at react-native-root-siblings/index.js:32) in RootSiblingsWrapper (at AppContainer.js:121) in RCTView (at View.js:34) in View (at AppContainer.js:132) in AppContainer (at renderApplication.js:39)

[my code] images =[img1,img2]

      <ScrollableTabView renderTabBar={() => {return <View/>}}>

                {images.map((item,index)=>{
                        return <View style={{flex:1}} key={"lbt" +index}>
                            <Image source ={item} style={{width:"100%",height:"100%"}}/>
                        </View>
                    })}
                </ScrollableTabView>

please help Screenshot_2021-01-30-15-48-07-420_com jqyshop 1

2017plus commented 3 years ago

did you resolve this error?

bakhtiararifinid commented 3 years ago

i got this error too

2017plus commented 3 years ago

I lowered the version of viewPager to 3.3.1, then resolve this error.

1253424710@qq.com

From: bakhtiar arifin Date: 2021-02-03 23:40 To: ptomasroos/react-native-scrollable-tab-view CC: 流百年; Comment Subject: Re: [ptomasroos/react-native-scrollable-tab-view] Check the render method of AnimatedComponent. (#1131) i got this error too — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

bakhtiararifinid commented 3 years ago

@2017plus that works for me. thanks a lot

lexoops commented 3 years ago

@2017plus 谢谢,解决了,3Q