Invariant Violation: Element type is invalid named import default import error in react js

preview_player
Показать описание
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Ensure that you are importing the component correctly. The most common mistake is a mismatch between the named and default imports.

Named Import

If you are exporting a component with export { MyComponent }, you should import it like:

import { MyComponent } from './MyComponent';

Default Import:
If you are exporting a component with export default MyComponent, you should import it like:

import MyComponent from './MyComponent';
Рекомендации по теме
Комментарии
Автор

Sir i have used proper import and export .but then also i got this error in console. I im stuck from 2 days please help me...

yashdixit
join shbcf.ru