'How to navigate multiple folders from app.js
I have a file structure like below
screens
..components
Avatar.js
..Contacts
ManageContacts.js
..Login
Signup.js
I am new to React Native application development and I have tried several ways to redirect files from App.js but nothing helped me.
App.js
1.const ManageContacts = React.lazy(() => import('../screens/Contacts/ManageContacts'));
2.const ManageContacts = React.lazy(() => import('../../screens/Contacts/ManageContacts'));
3.const ManageContacts = React.lazy(() => import('../../ManageContacts'));
4.const ManageContacts = React.lazy(() => import('./screens/Contacts/ManageContacts'));
Inside my App.js file I have tried to import the files like above 4 ways. But always I am getting error and am unable to resolve.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|