return 报错
来源:3-11 自定义 Hook 第二部分 - HOC的劣势

Aicheng123
2020-05-06
Parsing error: Unexpected token
11 | }
12 | const withLoader =
(WrappedComponent: React.ComponentType
, url: string) => {
13 | return class LoaderComponent extends React.Component<Partial, ILoaderState> {
| ^
14 | constructor(props: any) {
15 | super(props)
16 | this.state = {
如上return 报错
写回答
2回答
-
张轩
2020-05-08
同学你好 使用你贴给我的代码并没有报错 请检查用法是否有误 本节源代码在这里:
https://git.imooc.com/coding-428/react-with-ts/commit/f82a24100fad1a9d1d6274353ef1012002d712e3
00 -
张轩
2020-05-06
同学你好 能把你的全部代码贴一下吗 这样看一部分错误代码 没法很好的发现问题 谢谢
012020-05-06
相似问题