satya164 / react-native-tab-view

A cross-platform Tab View component for React Native
MIT License
5.14k stars 1.07k forks source link

Not able to render anything in anyway in Android #1352

Closed witalobenicio closed 2 years ago

witalobenicio commented 2 years ago

Current behavior

I'm always getting this error:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

This started to happen after update react-native-reanimated that lead me to update this lib because of another error (related to el.getNode).

<TabView
          {...this.props}
          navigationState={{
            index: 0,
            routes: [
              { key: 'follow', title: Strings.IN_PROGRESS },
              { key: 'done', title: Strings.FINISHEDS },
            ],
          }}
          renderScene={SceneMap({
            follow: () => (
              <View>
                <Text>Witalo</Text>
              </View>
            ),
            done: () => (
              <View>
                <Text>Witalo</Text>
              </View>
            ),
          })}
          onIndexChange={this.changeIndex}
          initialLayout={{ width: Dimensions.get('window').width }}
          renderTabBar={this.renderTabBar}
        />

I've also tried by not using SceneMap, in fact this is the way that was working before.

Expected behavior

This should show something in the tabs

Reproduction

I have no link

Platform

Environment

package version
react-native-tab-view 3.0.0 / 3.1.1
react-native-pager-view 6.0.0-rc.0
react-native 0.66.1
expo not using
node v14
npm or yarn 1.22.17
github-actions[bot] commented 2 years ago

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

github-actions[bot] commented 2 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] commented 2 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

witalobenicio commented 2 years ago

Fixed!

The problem was the version of react-native-pager-view. Anyone having this problem, just update to latest.

WNemencha commented 2 years ago

Had the same issue by following the pager-view's readme where it mention I should install react-native-pager-view@next, which lead yarn to install it at 6.0.0-rc.2. Fixed by downgrading to 5.4.23 as said by the cool bot!