Skip to content

Error: "Component *project_name* does not have a componentId!" after upgrading to React Native 0.68.7 #7908

@burakgenc10

Description

@burakgenc10

What happened?

I recently upgraded my React Native project to version 0.68.7. The project builds successfully, but I encounter the following error on the login screen:

**Error: Component erp does not have a componentId!

This error is located at:
in WrappedComponent (created by ReduxWrapper)
in Provider (created by ReduxWrapper)
in ReduxWrapper (at renderApplication.js:50)
in RCTView (at View.js:32)
in View (at AppContainer.js:92)
in RCTView (at View.js:32)
in View (at AppContainer.js:119)
in AppContainer (at renderApplication.js:43)
in erp(RootComponent) (at renderApplication.js:60)**

Here is the relevant code related to the login screen:

import setup from './setup';
import { Navigation } from "react-native-navigation";
import DiaScreenWrapper from "./dia/components/DiaScreenWrapper";
import {Provider} from 'react-redux';
import store from './dia/redux/store/configureStore';
import messaging from '@react-native-firebase/messaging';
import { useEffect } from 'react';

// App launch listener
Navigation.events().registerAppLaunchedListener(() => {
  Navigation.setRoot({
    root: {
      sideMenu: {
        id: 'sidemenu',
        left: {
          component: {
            name: 'DiaSideMenu',
            id: 'drawer',
          },
        },
        center: {
          stack: {
            children: [
              {
                component: {
                  name: "erp"
                }
              }
            ]
          }
        }
      }
    },
  });
});

// Component registration with Redux
const wrappedSetup = DiaScreenWrapper(setup)
Navigation.registerComponentWithRedux("erp", () => wrappedSetup, Provider, store);

Environment:

React Native version: 0.68.7
React Native Navigation version: 7.23.1
Redux version: 4.1.2

What was the expected behaviour?

No response

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version:
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Device model:
iOS version:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions