Hey. Sorry if I'm missing something obvious, but any idea why I might be getting the following error?
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. Check
the render method of PopperExample.
My PopperExample is basically a copy of the example code...
// PopperExample.js
import React from 'react'
import { PopperManager, Target, Popper, Arrow } from 'react-popper'
const PopperExample = () => (
<PopperManager placement="bottom">
<Target style={{ width: 120, height: 120, background: '#b4da55' }}>
Target Box
</Target>
<Popper className="popper">
Popper Content
<Arrow className="popper__arrow"/>
</Popper>
</PopperManager>
);
export default PopperExample;
+1
seems like current master is not published to npm
and we install https://github.com/souporserious/react-popper/tree/0.0.1
fast workaround:
yarn add souporserious/react-popper
## Webpack config:
{
...
module: {
rules: [
{ test: /\.jsx?$/, use: common.babelLoaders, exclude: /node_modules(?!\/react-popper)/ },
....
resolve: {
extensions: [".js", ".jsx", ".json"]
....
## Somewhere.js
import { PopperManager, Target, Popper, Arrow } from 'react-popper/src/react-popper'
...
hope @souporserious will publish last version soon
Apologies! I'll work on getting the build published today. I wanted to finalize a couple of things before then. Sorry about that, I wasn't sure anyone was using this yet 馃挬
Latest release is out 馃帀 enjoy! Please let me know if you find any other issues.
Most helpful comment
Apologies! I'll work on getting the build published today. I wanted to finalize a couple of things before then. Sorry about that, I wasn't sure anyone was using this yet 馃挬