无法编译错误: Line 6:43: React Hook "useState" is called in function "app" which is neither a Reactfunction component or a custom React Hook function react-hooks/rules-of-hooks
Line 14:39: Rea
调用了componentWillAppear,但我无法调用前者。我看到的大多数响应都要求确保回调被调用,我就是这么做的。如果有什么不同的话,我也在使用React路由器。任何帮助都将不胜感激。import React, { Component } from 'react';import PropTypes from 'prop-types
因此,我试图用React、Firebase和react firebase挂钩模块制作一个web应用程序,而我甚至无法编译我的代码。我已经卸载了至少3次的反应-消防钩现在和重新安装它一样。在我的代码中,我使用:import {useCollectionData} from 'react-firebase-hooks/firesto
我想在一个常规函数中使用我的自定义钩子,如下所示,但是React不让我这么做。我想知道是不是我的useUrl自定义钩子无效,或者调用钩子有问题。loading) return data
} 这会给我以下错误: React Hook "useUrl" is called in function "handleAddFormation" thatis neither a React function component nor a custom React Hook function.<
我试图在我的功能组件中使用React useState钩子,但是我得到了这个错误:./src/Person/Person.js
Line 5:43: React Hook "useState" is called in function "person" which is neithera React function component or a custom React Hook function <em