Replies: 1 comment
-
you should use functional component, not class component |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
这是报错信息:
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
源码:
`import React, {Component} from 'react';
import { useAccess, Access } from 'umi';
interface Props {
haha: string
}
interface State {
}
export default class AccessTest extends Component<Props, State> {
render() {
}`
在插件GitHub仓库找到有人提出这个issues,但是没人回答。。
Beta Was this translation helpful? Give feedback.
All reactions