Skip to main content
Added an extra solution conditioned on how the object is exported.
Source Link

Based on your folder structure, try import like this in index.js:

import { AppContainer } from './App/AppContainer';

If you are using a named export, that is if you are doing:

export class AppContainer [...]

If you are using a default export, such as:

export default class AppContainer [...]

The object destructuring will fail. You have to do instead:

import AppContainer from './App/AppContainer';

Based on your folder structure, try import like this in index.js:

import { AppContainer } from './App/AppContainer';

Based on your folder structure, try import like this in index.js:

import { AppContainer } from './App/AppContainer';

If you are using a named export, that is if you are doing:

export class AppContainer [...]

If you are using a default export, such as:

export default class AppContainer [...]

The object destructuring will fail. You have to do instead:

import AppContainer from './App/AppContainer';
Source Link
max23_
  • 6.7k
  • 4
  • 24
  • 36

Based on your folder structure, try import like this in index.js:

import { AppContainer } from './App/AppContainer';