Warning: React.createElement: type is invalid -- expected a string (for built-in components) when importing Popover
koolamusic opened this issue · comments
Currently experiencing this error in "react-tiny-popover": "^6.0.0-beta.2",
Where import Popover from 'react-tiny-popover
throws and export error whereas import {Popover} from 'react-tiny-popover
works fine.
Warning: React.createElement: 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.
If the later is the case, then the docs should be updated to reflect these changes I guess.
This is one of a few changes the beta has. For now, refer to index.d.ts and Popover.tsx.
Thanks for trying out the beta! Updated docs and demo site will be out soon.
Would be great if you could point me to the docs, won't mind contributing
I just ran into this, too. Would be great if a note were added to https://github.com/alexkatz/react-tiny-popover#migrating-from-versions-3-and-4 saying that we need to change
import Popover from 'react-tiny-popover';
to
import { Popover } from 'react-tiny-popover';
🙂