You can't use a jsx extension in React Native projects

If you are getting a Unable to resolve module error when trying to import or require a local JSX file in a React Native project:

import App from './components/App.jsx';

And the red screen suggestion doesn't work:

Unable to resolve module...

Unable to resolve module...

The actual problem is that React Native doesn't support the JSX extension. Rename your file to App.js and it'll work just fine.

If you liked this article, say hello on Twitter

blog comments powered by Disqus