I am trying to do simple navigation using react-native-navigation. But When I just import navagations.js file in homepage.js I am getting the error
Requiring unknown module "581".If you are sure the module is there, try restarting Metro Bundler. You may also want to run yarn
, or npm install
(depending on your environment).
My navigations.js
import { Navigation } from 'react-native-navigation';
export const goTo = () => Navigation.setRoot({
root: {
bottomTabs: {
id: 'BottomTabsId',
children: [
{
component: {
name: 'HomePage',
options: {
bottomTab: {
fontSize: 12,
text: 'Varas Home',
icon: './icons/home.png' )
}
}
},
},
{
component: {
name: 'EmployeeDetails',
options: {
bottomTab: {
text: 'Varas details',
fontSize: 12,
icon: './icons/home.png')
}
}
},
},
],
}
}
});
I am not sure whats wrong here?. I did not use anything such "Metro Bundler".