I'm brand new to React Native, and am already stuck at a seemingly obvious problem.
So I get an error
Unable to resolve "src/AppNavigator" from "App.js"
when I try to access my AppNavigator from App.js. Here is my App.js:
import React from 'react';
import { createAppContainer } from 'react-navigation';
import AppNavigator from 'src/AppNavigator';
const App = createAppContainer(AppNavigator);
export default App;
and project structure:
-App.js
-babel.config.js
-index.js (what do you even use this for?)
-app.json
-package.json
-package-lock.json
-src
|_ AppNavigator.js
|_ react-native.config.js
|_ screens
| |_ //...
|_ assets
|_ //...
-android
|_ //...
-ios
|_ //...
-__tests__
|_ //...
-node_modules
|_ //...
I've tried solutions outlined in this github thread, among others, but none seem to work (not exactly surprising as any documentation becomes obsolete after 6 months...), so I am stuck!
I've tried replacing src/AppNavigator with ./AppNavigator and ../AppNavigator for good measure, but that didn't work either.
Anyway know what's going on here?