react-copy-to-clipboard
react-copy-to-clipboard copied to clipboard
Component.js:28 Uncaught TypeError: Super expression must either be null or a function, not undefined
I got this error right here -> import {CopyToClipboard} from 'react-copy-to-clipboard';
React v16
You are destructuring. Try using:
import CopyToClipboard from 'react-copy-to-clipboard'
Without the curly brackets.
I'm seeing the same issue. It's not a problem with the destructuring syntax.
Any way to reproduce this? Like codepen or something?
I had the same issue where the superClass was undefined in function _inherits(subClass, superClass) I did a workaround by simply setting the superClass = null under if (typeof superClass !== "function" && superClass !== null)
It seems to work for now...
the same error if i use: import CopyToClipboard from 'react-copy-to-clipboard'; can be some version (react) problem ?