我正在尝试创建一个react类装饰器,它向任何react组件添加一些道具,并返回装饰器中包含当前道具和额外道具的装饰组件。我能够找到一个常规typescript类装饰器的工作代码,可以在typescript的上找到。但是,这是针对泛型类的。它不包含任何react类型。下面是我想用React和Typescript实现的类似功能:@AddOtherProps
c
Installing react, react-dom, and react-scripts with cra-template...
npm ERR!notarget No matching version found for @typescript-eslint/typescript-estree@5.36.1.
npm ERR!npm install --no-audit --save --save-exact --loglevel error
我有以下TypeScript (v3.01) React组件,名为TopBar,我现在将Redux添加到其中。然后在名为Layout的父组件中引用TopBar组件。组件中引用该组件时import { TopBar } from './TopBar';
export class Layout extends Re