wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.05k stars 2.67k forks source link

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

Open burakgenc10 opened 3 months ago

burakgenc10 commented 3 months ago

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?

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: