I tried importing my index.js located in src/navigation/index.js to App.js using the At Sign Symbol (@) but it shows unable to resolve path to module. Am I missing something important here?
My files structure,
src/navigation/package.json
{
"name": "@navigation"
}
App.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { Provider } from 'react-redux';
import store from './src/store';
import Navigation from '@navigation';
export default class App extends React.Component {
render() {
return (
<Provider store={store}>
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<Navigation />
</View>
</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Thanks.