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.29k forks source link

Error on view pager #1148

Open puneetkansal04 opened 3 years ago

puneetkansal04 commented 3 years ago

React latest version

"react": "17.0.1", "react-native": "0.64.2",

Error: Element ref was specified as a string (viewPager) but no owner was set. This could happen for one of the following reasons:

  1. You may be adding a ref to a function component
  2. You may be adding a ref to a component that was not created inside a component's render method
  3. You have multiple copies of React loaded See https://reactjs.org/link/refs-must-have-owner for more information.

This error is located at: in ViewPager (at createAnimatedComponent.js:217) in AnimatedComponent (at createAnimatedComponent.js:278) in 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 ScrollableTabbar.js:8) in ScrollableTabbar (at VendorProfileScreen.js:44) in RCTView (at View.js:34) in View (at VendorProfileScreen.js:43) in RCTView (at View.js:34) in View (at VendorProfileScreen.js:21) in RCTView (at View.js:34) in View (at VendorProfileScreen.js:19) in VendorProfileScreen (at SceneView.tsx:122) in StaticContainer 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 CardSheet (at Card.tsx:573) in RCTView (at View.js:34) in View (at createAnimatedComponent.js:217) in AnimatedComponent (at createAnimatedComponent.js:278) in 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:217) in AnimatedComponent (at createAnimatedComponent.js:278) in 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:623) in RNSScreen (at createAnimatedComponent.js:217) in AnimatedComponent (at createAnimatedComponent.js:278) in AnimatedComponentWrapper (at src/index.native.tsx:147) in Screen (at Screens.tsx:74) in MaybeScreen (at CardStack.tsx:616) in RNSScreenContainer (at src/index.native.tsx:186) in ScreenContainer (at Screens.tsx:50) in MaybeScreenContainer (at CardStack.tsx:498) in CardStack (at StackView.tsx:462) in KeyboardManager (at StackView.tsx:458) in RNCSafeAreaProvider (at SafeAreaContext.tsx:76) in SafeAreaProvider (at SafeAreaProviderCompat.tsx:42) in SafeAreaProviderCompat (at StackView.tsx:455) in GestureHandlerRootView (at GestureHandlerRootView.android.tsx:26) in GestureHandlerRootView (at StackView.tsx:454) in StackView (at createStackNavigator.tsx:87) in StackNavigator (at StackNavigator.js:32) in EnsureSingleNavigator (at BaseNavigationContainer.tsx:409) in BaseNavigationContainer (at NavigationContainer.tsx:91) in ThemeProvider (at NavigationContainer.tsx:90) in NavigationContainer (at StackNavigator.js:31) in StackNavigator (at App.js:15) in Provider (at App.js:13) in App (at renderApplication.js:47) in RCTView (at View.js:34) in View (at AppContainer.js:107) in RCTView (at View.js:34) in View (at AppContainer.js:134) in AppContainer (at renderApplication.js:40)

If I add @react-native-community/viewpager 2.0.2 then iOS is not working how can I resolve it. Or please add latest version of view pager in the package.

SyedTayyabUlMazhar1 commented 3 years ago

I am facing a similar error: Element ref was specified as a string (tabContainer) but no owner was set

yuezonglun commented 2 years ago

Me too, how did you solve it?

farhoudshapouran commented 2 years ago

You can use this https://www.npmjs.com/package/react-native-scrollable-tab-view-forked

bodrius commented 2 years ago

the same problem +++

yuezonglun commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

dhon2407 commented 2 years ago

I currently have same issue, did someone manage to solve this?

yuezonglun commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

dhon2407 commented 2 years ago

You can use this https://www.npmjs.com/package/react-native-scrollable-tab-view-forked

Is there some migration guide for this, have a new error about [Error: Objects are not valid as a React child (found: object with keys {tabLabel, style, children})] when i used the forked version.

sharifme04 commented 2 years ago

I am also facing similar error, Does anyone know any solution ?

Screenshot 2022-03-21 at 2 11 20 PM
yuezonglun commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

omarbakr2020 commented 1 year ago

Any updates regarding this issue?

yuezonglun commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

deepakkpardeshi commented 1 year ago

I was also facing the same issue due to conflict in peer dependencies. npm i --legacy-peer-deps fixed my issue.

yuezonglun commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

alvishdml commented 1 year ago

I was also facing the same issue due to conflict in peer dependencies. npm i --legacy-peer-deps fixed my issue.

yuezonglun commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

111Tashmo commented 4 months ago

same issue to me.....any update?

yuezonglun commented 4 months ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

111Tashmo commented 4 months ago

I was also facing the same issue due to conflict in peer dependencies. npm i --legacy-peer-deps fixed my issue.

guys this works for me

hu-qi commented 4 months ago

I was also facing the same issue due to conflict in peer dependencies. npm i --legacy-peer-deps fixed my issue.

Yeah, It works for me, thanks!