报错内容
./src/Containers/device/add/index.tsx
Line 284:23: React Hook "useState" is called in function "newDeviceForm" which is neither a React function component or a custom React Hook function react-hooks/rules-of-hooks
Search for the keywords to learn more about each error.
解决方案
把报错的组件改写为class或构造函数。
- 找到报错函数
- 报错Function首字母改为大写即可