错误:
inherits.js:21 Uncaught TypeError: Super expression must either be null or a function, not undefined
at exports.default (inherits.js:21)
这个错误就是提示你类型错误,一般的错误有:
- 可能是super()写成了 Super();
- 可能是继承的时候把React.Component携程了React.component
- 或者是打字的时候拼写错误
综合:将大小写写错,或者拼写错误。