I've been doing React for ~2 years, I've started learning React Native a few days ago and immediately ran into a wall.
I'm trying to import a simple .jsx file into my App.js:
import PostsPage from './pages/PostsPage/PostsPageContainer.jsx';
Here's the error I'm getting:
Unable to resolve ./pages/PostsPage/PostsPageContainer.jsx" from ".//App.js: could not resolve
/Users/MyUser/Documents/app-name/pages/PostsPage/PostsPageContainer.jsx' as a file nor as a folder","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]},"type":"bundling_error"}"
There's a huge thread on this error but it's all people trying to import outside modules. I'm trying to import a regular .jsx file which I'd created myself. I've double and triple-checked that the file does exist and it's spelled right. I've also tried restarting the packager and clearing cache.
I've used create-react-native-app
to create this app.
For your file extensions in react-native, use .js instead of .jsx. The default extension is .js unless you want to disable that rule.