collapse
collapse copied to clipboard
rc-collapse fires an "unexpected import" error with react 16.6.3
Following along with the examples, using Collapse
triggers this error in my build:
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `ComponentName`.
Replacing Collapse
with nothing or a string clears up the error. Panel export is fine.
React 16.6.3 Create-React-App stack Chrome browser
Any reproduce?
The same thing here, I found the workaround for the import:
import Collapse from 'rc-collapse/es/index';