请问下大家 react 的组件的 props 有 orgId ,直接写props.orgId会报ts警告,如果不用any,这种应该怎么写类型呢
向大家请教一个react tsx的问题
V2R
#3
还有一种是React.FC<{children?: ReactNode, orgId: string}>
如果是路由相关可以
import type { RouteComponentProps } from ‘react-router-dom’;
interface MatchParams {
id: string;
orgId: string;
}
React.FC<RouteComponentProps>