我正在构建一个react本机应用程序。我有一个父组件和一个子组件。子组件有一个按钮,其事件处理程序位于父组件中。在事件处理程序的末尾,我还必须更新子组件中的特定状态。因此,我使用父组件中的useRef钩子来创建子组件的引用。当我悬停在它上面时,会出现以下错误
Property 'setIsDataManipulated' does not exist on type 'FC<TCh
我在使用React和TypeScript时,在我的联系人组件中得到了一个ESlint错误Don't use `{}` as a type. `{}` actually means "any non-nullish该组件没有任何道具。export default class Contact extends React.Component<{}, MyState> {
constructor(props = {}) {